Re: windows file permission

From: Date: Wed, 19 Nov 2003 02:29:18 +0000
Subject: Re: windows file permission
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170228@lists.php.net to get a copy of this message
Chris Williams wrote:
I am using PHP on Windows NT CGI/FastCGI and am trying to create a text file and then write some data to it. $some_text = "HelloWorld"; $new_file = fopen("myfile.txt", "w"); fputs($new_file, $some_text); fclose($new_file); However I am getting Warning: fopen(myfile.txt): failed to open stream: Permission denied in... I don't usually work on Windows but I checked the file permissons on this folder and they seem to be 777 or drwxrwxrwx I'm guessing I have no idea how Windows permissions work.
I'm not sure what user PHP runs as when using CGI, so you'll probably need to give "Everyone" permission to read/write to the directory this script is run in. Right click on the folder, choose the Security tab, and add Everyone as a user with the appropriate permissions. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#170228) next »