fopen() and fwrite() not working
Posted: Mon Apr 13, 2009 10:25 pm
So this code used to work but then i re-structured the way it handles to make it easier for accessing the uploads yet it fails.
My root looks like this
index.php
upload.php
no errors occur but the text file 'list.txt' isn't being created, it isn't be written with the filename, and it obviously isn't closing if its not opening.
My root looks like this
index.php
upload.php
no errors occur but the text file 'list.txt' isn't being created, it isn't be written with the filename, and it obviously isn't closing if its not opening.
Code: Select all
/* file listing text file for listing off uploads */
$fileHandle = fopen("uploads/list.txt", 'a');
$fileName = $_FILES["file"]["name"];
fwrite($fileHandle, $fileName);
fclose($fileHandle);