|
|
Joined: Mar 2000
Posts: 111
Member
|
Member
Joined: Mar 2000
Posts: 111 |
Hey, I would like to know how to make a directory using perl. Say I want the directory to use the name from the variable $title, how would I go about making a directory with that variable as the name? And if its possible how could I use the password from the variable $pword to password protect the directory? Thanks for the help, I hope you can understand all that ![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
Co-Admin of Creature World.
|
|
|
|
Joined: Sep 2000
Posts: 6
Member
|
Member
Joined: Sep 2000
Posts: 6 |
making directory is simple.. like this
mkdir ($saveDirectory, 777);
I think you need to look at the book for password protect the directory.
------------------ Thank you
Thank you
|
|
|
|
Joined: Mar 2000
Posts: 111
Member
|
Member
Joined: Mar 2000
Posts: 111 |
Thanks, I can't believe I didn't remeber that. I remeber seeing it in the UBB code all the time ![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif) Oh and if you find out how to password protect it please post it, Thanks!
Co-Admin of Creature World.
|
|
|
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Depending on what you are using the directory for, you should change the chmod. ------------------ Da Wannabe Cannuck:: Who is Andy?
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
Always or die your commands like that.
mkdir($title,0666) or die "Directory not created. Reason why: $!";
EDIT: I was typing as atom replied. How funny. *L*
------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster. Read my BIO in the team link!
This message has been edited by MasterMind on October 25, 2000 at 05:20 PM
|
|
|
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Yes...I have been told that die commands should be used on any system command that the script is dependant upon. ![[Linked Image]](https://ubbdev.com/ubb/smilies/biggrin.gif) ------------------ Da Wannabe Cannuck:: Who is Andy?
|
|
|
|
Joined: Mar 2000
Posts: 111
Member
|
Member
Joined: Mar 2000
Posts: 111 |
Thanks for the help, it worked great! But I still need to know how to make it put a password to the directory ![[Linked Image]](https://ubbdev.com/ubb/smilies/frown.gif)
Co-Admin of Creature World.
|
|
|
|
Joined: May 2000
Posts: 243
Member
|
Member
Joined: May 2000
Posts: 243 |
Well, you could find a tutorial on how to password protext directories useing .htaccess. If you need further help. Please post
|
|
|
|
Joined: Mar 2000
Posts: 111
Member
|
Member
Joined: Mar 2000
Posts: 111 |
I don't think that would work, since this is what I need it for:
I made a script (for a guy that runs a clan site) that lets people enter details about there clan and then submits it, what I have it do now is when they hit submit it makes a directory with the name of there clan as the title, and a html page with all the info they put. But I also want each directory password protected with a password they choose so I can make another script that log's you in then you can edit your clan detials and see the requests that people have made.
Would .htaccess work for that? If so can you point me in the direction of a good tutorial aon it?
Thanks!
Co-Admin of Creature World.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,932
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|