Jump to content

pinky_6548

Members
  • Posts

    2
  • Joined

  • Last visited

pinky_6548's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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
  2. 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
×
×
  • Create New...