Re: MkDir Help

From: Date: Thu, 23 Oct 2008 00:56:17 +0000
Subject: Re: MkDir Help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282320@lists.php.net to get a copy of this message
Jason Todd Slack-Moehrle wrote:
Hi All, I want to make a directory on my web server programatically when my code to create a new user runs. I am running PHP 5.2.5 on Linux. I am running: $dirToCreate = "..".$_SESSION['s_USER_URL']; mkdir($dirToCreate, 0777, TRUE); // create the directory for the user $dirToCreate is: ../people/jason as an example When I create this I am in <wwwroot>/admin and I want to create <wwwroot>/people/jason <wwwroot>/people already exists. I get an error: Warning: mkdir() expects at most 2 parameters, 3 given in /home/net1003/public_html/admin/_createPage.inc on line 5 Even without TRUE< this operation does not work. Does anyone have any thoughts? -Jason
Along with what everybody else said. echo out $dirToCreate and see if it is exactly what you expect it to be. ../people/jason Also, make sure that that directory doesn't already exist.

« previous php.general (#282320) next »