Creating Files Windows vs Unix

From: Date: Thu, 15 Mar 2001 06:50:56 +0000
Subject: Creating Files Windows vs Unix
Groups: php.general 
Request: Send a blank email to php-general+get-43975@lists.php.net to get a copy of this message
Today I was uploading my completed script to my school's server at http://www.u.arizona.edu/~avr/school/questionanswer.phtml?questionFileName=testQA and noticed when I fill in the form and hit submit, I get a lot of errors such as unable to access current working directory, unable to access my file, and unable to find file identifier. In problem shooting, I changed the permissions of all the files for this script so that everyone can read write and execute them but I still get the errors. I suspect it has to do with the way my script creates a 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, apache, and php this seems to work without a hitch (even if the file doesn't exist), but appartently it doesn't work for my school's server. I was wondering why it works on my computer but not on the server (I suspect it may have something to do with security)?? 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? -Thanks Andrew V. Romero To reply personally, remove all numbers from my address.

« previous php.general (#43975) next »