PHP Classes

File Creation in PHP

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  File Creation in PHP  
Subject:File Creation in PHP
Summary:Creating a New File in harddisk - issue
Messages:3
Author:gv
Date:2010-04-21 03:47:26
Update:2010-05-11 12:29:07
 

  1. File Creation in PHP   Reply   Report abuse  
Picture of gv gv - 2010-04-21 04:03:06
While I am able to read & write afresh to an existing file in the harddisk
in a web directory, I am unable to decypher, why I am NOT able to Create
a new File with fopen("xyz.txt",'w').

The error message I get is
Warning: fopen(./images/Inside City/WaterFront/P1130106.txt) [function.fopen]: failed to open stream: Permission denied ...

While I understand, this has to do with permissions, can anyone suggest,
why I get this error, inspite of the fact, that when a file is existing,
the fopen opens the file, and fwrite deletes and rewrites into it successfully.
But when I want to CREATE a file, I get the above error. I have
given public permission to images folder.

Any help would be appreciated.

There are 2 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.