Help - Search - Members - Calendar
Full Version: Cannot Create Or Open .txt File On Zymic Hosting
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
VonMarcus
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_
try usin the fopen($file,"a") for read write permision on the file.
Andrew
make sure you CHMOD the file your trying to write in your FTP program
VonMarcus
hey thanks for the input i did chmod the file and everything is working now.
Andrew
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.
Invision Power Board © 2001-2012 Invision Power Services, Inc.