Okay, I found out how to make a directory, but how do I make a directly inside one that already exists and isn't in the same directory as my script?? Also, how do I make new files inside the new directly?
Thanks!
--Edge
Rob Pengelly posted this at 19:07 — 14th May 2000.
I needed a folder for each person that signed up and the directory permissions were wrong until I added the 0 in front. But now it works! Thanks for helping me figure it out!!
At least do a filter so they can't type in ../ and anything but letters, _ , and numbers.
Owen
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
Edge posted this at 17:15 — 14th May 2000.
They have: 117 posts
Joined: Mar 2000
Okay, I found out how to make a directory, but how do I make a directly inside one that already exists and isn't in the same directory as my script?? Also, how do I make new files inside the new directly?
Thanks!
--Edge
Rob Pengelly posted this at 19:07 — 14th May 2000.
They have: 850 posts
Joined: Jul 1999
Wouldn't you just do something like:
$newdir = "images";
$newestdir = "people";
mkdir("$dir",775);
mkdir("$dir/$newestdir",775);
And to make a file in the newest directory, just
open(IN,">/$newdir/$newestdir/file.txt");
close(IN);
------------------
click here to help save lives
http://www.wiredstart.com : The Technology Start Page
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
fairhousing posted this at 22:13 — 14th May 2000.
They have: 1,587 posts
Joined: Mar 1999
robp is thorough as usual. ur great robp for helping us folks out.
thx
------------------
CLICK 4 some tested resources for making money $, hosting, and web promotions.
My Site got hacked, but i'm coming back?
Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?
Edge posted this at 23:31 — 14th May 2000.
They have: 117 posts
Joined: Mar 2000
Not quite. It was actually something like:
$dir = "members";
mkdir("$dir",0777);
mkdir("$dir/$FORM{'username'}",0777);
I needed a folder for each person that signed up and the directory permissions were wrong until I added the 0 in front. But now it works! Thanks for helping me figure it out!!
--Edge
anti posted this at 08:26 — 15th May 2000.
They have: 453 posts
Joined: Jan 1999
Ouch!!!!
Never use unchecked user input in a system call !!!
You've just build yourself a big (security-)hole. Just wait for someone to push you into it.
Where are you using this script ?!
ciao
Anti
Edge posted this at 22:51 — 16th May 2000.
They have: 117 posts
Joined: Mar 2000
How else would I go about making a directory for each member?
--Edge
BitSurfr posted this at 04:26 — 17th May 2000.
They have: 29 posts
Joined: Dec 1999
At least do a filter so they can't type in ../ and anything but letters, _ , and numbers.
Owen
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.