Re: [PHP] Random number generation...

2001-05-02 Thread Avetis Avagyan
Regards, Avetis [EMAIL PROTECTED] wrote: > Hi there, > A potentially dumb question here. > > Is there an easy way to display a random number between 1 and 20? > > I have looked on line, but either I am looking inall teh wrong places, or there > isn't this script on-line. > > Can anyone point m

Re: [PHP] .inc location security

2001-04-24 Thread Avetis Avagyan
You can consider also Order allow,deny Deny from all sections are processed in the order they appear in the configuration file, after the sections and .htaccess files are read, but before sections. Note that can be nested inside sections to restrict the portion of the filesystem t

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Avetis Avagyan
Something like this: output this html-block output that html-block Regards, Avetis Martin Thoma wrote: > Hello ! > > I want to do something like > > if (condition) > output this html-block > else > output that html-block > > Without printig or echoing the html-block out (beca

Re: [PHP] replace function in a file.

2001-04-19 Thread Avetis Avagyan
Hello, something like this: $filename="your_file_name.txt"; $fp = fopen($filename, "r+") or die ("Could not open file"); $content = fread ($fp, filesize($filename)); $new_content = str_replace("old_word", "new_word", $content); rewind($fp); fwrite($fp, $new_content); ftruncate($fp, ftell($fp)); f