Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-28-2002, 04:00 PM   PM User | #1
am3
New to the CF scene

 
Join Date: Aug 2002
Location: NY, USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
am3 is an unknown quantity at this point
mkdir() HELP HELP!

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
am3 is offline   Reply With Quote
Old 08-29-2002, 12:52 PM   PM User | #2
mr_ego
Regular Coder

 
Join Date: Jun 2002
Location: Brisbane, Australia
Posts: 181
Thanks: 1
Thanked 0 Times in 0 Posts
mr_ego is an unknown quantity at this point
most likely your server has blocked you from making new directories (could be wrong though).
mr_ego is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:44 PM.


Advertisement
Log in to turn off these ads.