pinky_6548 Posted January 10, 2006 Share Posted January 10, 2006 Hi, I am new with PHP and I am writing a simple code in PHP that does following: <?$file_name = "something.txt";$file_pointer = fopen($file_name, "w");fwrite($file_pointer, "what you wanna write");fclose($file_pointer); echo "data written to file successfully"; ?> But once i upload this simple funtion gives me error:Warning: fopen(something.txt): failed to open stream: Permission deniedWarning: fwrite(): supplied argument is not a valid stream resource Warning: fclose(): supplied argument is not a valid stream resource And somehow reading from file works very well.Has someone faced this before and can help me.Thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted January 10, 2006 Share Posted January 10, 2006 You should post this in the PHP forum. Can a Mod please move this.Thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted January 10, 2006 Share Posted January 10, 2006 Actually they just double posted in both forums...this one can be deleted. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now