PHP - This Confuses Me Sooo Much!
$0 [
Warning: Division by zero in /home/mintcity/public_html/v2/inc.cartel.buy.php on line 44 0] <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica">$<? echo number_format($myrowcs[price]) ?> [<font size="1" face="Verdana, Arial, Helvetica" color="#FFC000"><u><? echo floor(($myrow2b[money] / $myrowcs[price])); ?></u></font>]</font></b></td> This is my code on line 44. Any help would be greatly appreciated. Similar TutorialsHello all, I'm trying to open a file, take some text from it conditionally, and paste the newly edited text back into the same file. At first I used a seperate fopen($handle, 'r') handler to open the file to read it, get its contents CONDITIONALLY, close the read handler, and open a new write handler to overwrite the file. In short, I need to extract the text from the file after ignoring some amount of text , and then rewrite the file with the newly altered text. I was trying out r+ and w+ options when using fopen(), but w+ is working in a way thats leaving me confused. Here is my code. $file = 'test.txt'; $fileHandle = fopen($file,'w+'); fwrite($fileHandle, 'Newly inserted text'); $fileContents = fread($fileHandle, filesize($file)); echo $fileContents; fclose($fileHandle); The manual says that if the w+ option is specified then the file is opened for reading and writing. From what I understand this means that I should be able to read from the file after writing to it. But the code above displays nothing after writing to the file. The file is chmodded 777. Can someone please explain to me why this is so Thanks |