...

mkdir() HELP HELP!

am3
08-28-2002, 04:00 PM
HELP! HELP! HELP! HELP!

I can't find a good CGI tutorial on mkdir's
The ones I do find only show part of the code like:
"mkdir($dir,0777)"
THEY DON' SHOW what's before this (how to query it) or after the code (HOW TO finish the execution).

I use PHP but the SAFE MODE is on so It's not working right.
I downloaded CGI programs that mkdir's on my server but I can't under stand the code.

Here is what I came up with to pars my own form query >>>>

########################################################
$QueryString = $ENV{ 'QUERY_STRING' } ;

@NameValuePairs = split (/&/, $QueryString, 1);

$parent_dir = "/home/user/public_html/folder/";

foreach $NameValue (@NameValuePairs)
{
($Name, $Value) = split (/=/, $NameValue);
$Value =~ tr/+/ /;
mkdir($parent_dir$Value,0777) || die "Cannot mkdir newdir: $!";
}
########################################################

Can you help me out ser with a complete sample of a query to make a directory?
Thanks!

AlexMcleaniii@yahoo.com

mr_ego
08-29-2002, 12:52 PM
most likely your server has blocked you from making new directories (could be wrong though).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum