VonMarcus
Apr 18 2008, 09:15 PM
Hi,
I am new to php and have been trying to open and write to a .txt file on zymic free hosting. my code is below:- but somehow i get permission denied, are we not allowed to set permission in user created folders. Would really appreciate if someone can answer this.
<?php
$file = 'users.txt';
$fh =fopen($file,'w') or die('Could not open file line # 12');
fwrite($fh,'Hello i have edited this file now');
fclose($fh);
echo "the file has been written too";
echo "<br>";
echo "<br>";
?>
ap_
Apr 18 2008, 09:17 PM
try usin the fopen($file,"a") for read write permision on the file.
Andrew
Apr 20 2008, 04:00 PM
make sure you CHMOD the file your trying to write in your FTP program
VonMarcus
Apr 22 2008, 07:02 AM
hey thanks for the input i did chmod the file and everything is working now.
Andrew
Apr 22 2008, 09:24 AM
Good to hear!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.