Posted by acorn71 on 12/31/05 01:04
hello, i just recently started getting permission errors when writing
to a file that's been working fine for a couple weeks now. i have made
no changes to the file or folder permission settings and i was
wondering if anyone knew of any other factors that could cause these
types of errors below. thanks in advance for a help with this problem.
aaron;
$content = "my file content";
// create a filename variable with the .iif extension for Quick Books
$filename = "qbprod.iif";
// delete old file so a new file can be created
unlink($filename);
// create a new file
$handle = fopen("/home/mysite/www/qbdata/$filename", 'a');
// write the contents to the file
fwrite($handle, $content);
// have dialog box prompt the user to open or save the file
header("Location:
http://www.mysite.com/qbdata/get_file.php?filename=$filename");
Warning: Unlink failed (No such file or directory) in
/home/www/mysite/qbdata/get_product_data.php on line 112
Warning: fopen("/home/goknobs/www/qbdata/qbprod.iif", "a") - Permission
denied in /home/www/mysite/qbdata/get_product_data.php on line 115
Warning: Supplied argument is not a valid File-Handle resource in
/home/www/mysite/qbdata/get_product_data.php on line 118
Warning: Cannot add header information - headers already sent by
(output started at /home/www/mysite/qbdata/get_product_data.php:112) in
/home/www/mysite/qbdata/get_product_data.php on line 121
[Back to original message]
|