Re: Creating Files Windows vs Unix

From: Date: Thu, 15 Mar 2001 17:59:55 +0000
Subject: Re: Creating Files Windows vs Unix
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-44084@lists.php.net to get a copy of this message
I believe the school does run *nix servers. I tried changing the permissions for the directory so that everyone (and their brother) has read write and execute permission, but I still get all the errors. Is there any other ideas that I can try? Christian Reiniger wrote: > On Thursday 15 March 2001 07:50, you wrote: > > > file. In qa.php3 I have the following line which seems to create a file > > if it does not exist: > > $answerFile = "$questionFileName-A.txt"; Then I go along and open this > > later with $wa=fopen("$answerFile","a"); > > In problem shooting I tried uploading a blank file with the name > > $questionFileName-A.txt and it worked just fine after that, but that > > will not work for my long term goals On my home computer with win98, > > Ok, Assuming that your school server is an *nix system I think I know the > solution. > > Apparently fopen () works fine if you just append to an existing file, > but fails if it has to create a new file. So - do you have write > permissions for the directory you place the file in (creating a file > means modifying (i.e. writing to) the directory) ? > > > To get around this, I supose I need a few lines of code that first test > > if my file exist and then if it doesn't I will have to create it using > > the touch command?? Any other ideas? > > If I'm right this won't work as well. > > -- > Christian Reiniger > LGDC Webmaster (http://sunsite.dk/lgdc/) > > Pretty cool, the kind of power information technology puts in our hands > these days. > > - Securityfocus on probing 36000000 hosts for known problems in 3 weeks > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#44084) next »