hi

here is my code;

$fp = fopen("websites/$id/index.htm", "w+");
fwrite($fp, $page);
fclose($fp);

and here is the error i receive

Fatal error: Call to undefined function: fopen() in blah blah blah

i have checked the php.net, made sure php.ini configurations were correct.

i have php v4.2.3 on IIS with WinXP (btw i am receiving this error on localhost, and index.htm does not exist)

searched all of the net to find a solution, found an answer telling me to install a library, but i know fopen() is built-in in my version of php. there was only one related post but there was no solutions posted so i decided to post this one..

please help me before i start to lose all my hair...

[if you dont have any idea, you can just tell me how to create a file without using fopen().]

    I've found that if you copy/paste from a html page displaying php code it copys across hidden characters, which php doesn't seem to like. I can't see any errors in your code, so maybe this is the case? If so try typing it instead of copy/paste.

      Write a Reply...