Gossamer Forum
Home : General : Perl Programming :

Re: [Paul] error on mkdir

Quote Reply
Re: [Paul] error on mkdir
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
Subject Author Views Date
Thread Re: [Paul] error on mkdir am3 9312 Aug 28, 2002, 7:42 AM
Thread Re: [am3] error on mkdir
Paul 9164 Aug 28, 2002, 8:14 AM
Thread Re: [Paul] error on mkdir
am3 9145 Aug 28, 2002, 8:17 AM
Thread Re: [am3] error on mkdir
Paul 9149 Aug 28, 2002, 8:18 AM
Thread Re: [Paul] error on mkdir
am3 9145 Aug 28, 2002, 8:28 AM
Thread Re: [am3] error on mkdir
Paul 9139 Aug 28, 2002, 8:50 AM
Thread Re: [Paul] error on mkdir
am3 9132 Aug 28, 2002, 9:11 AM
Thread Re: [am3] error on mkdir
Paul 9132 Aug 28, 2002, 9:17 AM
Thread Re: [Paul] error on mkdir
am3 9121 Aug 28, 2002, 9:56 AM
Thread Re: [am3] error on mkdir
Andy 9147 Aug 28, 2002, 10:47 AM
Post Re: [Andy] error on mkdir
am3 9109 Aug 28, 2002, 12:50 PM
Thread Re: [Paul] error on mkdir
am3 9116 Aug 30, 2002, 9:02 PM
Thread Re: [am3] error on mkdir
Paul 9085 Aug 31, 2002, 2:16 AM
Post Re: [Paul] error on mkdir
am3 9021 Sep 12, 2002, 1:40 PM
Post Re: [am3] error on mkdir
Paul 9131 Aug 28, 2002, 9:00 AM