On Wed, 18 Apr 2007 17:12:20 +0000 (UTC), "AdonaiEchad"
<webforumsuser@macromedia.com> wrote:
>I really do not know what $vName means. I saw this script
at a site and it
>works when it is static it is when I use dynamic
attributes that it gives me an
>error.
>
> So if $makedir = "$row_rsRegGet['regID']"; was $makedir
= "addFolder"; it will
>make a folder within the /register/userFile/addFolder/.
The problem lies when
>placing the dynamci I can not seem to get to function.
You still don't say what the error message is. It could be a
permissions
issue. However, I do see an error in your code:
$makedir = "$row_rsRegGet['regID']";
You cannot use the single quotes on an array key inside
double quotes.
Change the above to:
$makedir = $row_rsRegGet['regID'];
If you modify your code thusly, it should either work and, if
it fails,
at least tell you what the directory is that it's trying to
create:
$row_rsRegGet['regID']=101;
// Start insert folder
$makedir = $row_rsRegGet['regID'];
$targetdir = "/register/userFile/$makedir";
$targetpath = $_SERVER['DOCUMENT_ROOT'] . $targetdir;
if(mkdir($targetpath,0700)){
print "Created directory $targetdir";
}else{
print "Failed to create $targetdir";
}
// End insert folder
If it fails, supply the error message.
Gary