i am learning php with fedora core 4, i wrote the code
*******************************************************
$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
*******************************************************
in my /var/www/html/firstphp.php, and opened it with my browser
http://localhost/firstphp.php
and it says "can't open file", however, if the file never existed, it would now be created, quoted by
www.tizag.com
" The file "testFile.txt" should be created in the same directory where this PHP code resides. PHP will see that "testFile.txt" does not exist and will create it after running this code. "
there is nothing called testFile.txt in my /var/www/html