R/W files outside the WebServer folder
| From: | Ken Tozier | Date: | Thu, 08 May 2003 02:40:12 +0000 |
| Subject: | R/W files outside the WebServer folder | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146776@lists.php.net to get a copy of this message | ||
I'm sure this is an easy one, but I can't create or access anything outside my "/Library/WebServer/" folder from PHP. I read the permissions documentation but it hasn't helped, Could someone explain how to do the following?
I created the folder "/users/testuser/desktop/test_folder" on my Mac desktop, chmoded it to 0777 and want the ability to create both files and folders inside this folder.
Here's a little script I wrote to work out the details
<?PHP
$base_dir = "/users/testuser/desktop/test_folder";
$new_dir = mkdir($base_dir."/05.08.2003", 0777);
?>
When run from a browser, I get the following error:
Warning: mkdir(/users/testuser/desktop/test_folder/05.08.2003) [function.mkdir]: No such file or directory in /Library/WebServer/Documents/junk.php on line 2
Clearly permissions are the problem but I don't know how to give PHP the permissions it wants. Could someone show me step by step how to do it?
Thanks,
Ken Tozier