create a php link by creating by making directory in unix

Reply

Join Date: Feb 2007
Posts: 2
Reputation: sarita.t is an unknown quantity at this point 
Solved Threads: 0
sarita.t sarita.t is offline Offline
Newbie Poster

create a php link by creating by making directory in unix

 
0
  #1
Feb 8th, 2007
I want to know the solution for creating a link in php page by making a directory in unix.?if somebody knows the answer kindly reply.

Thank you
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: create a php link by creating by making directory in unix

 
0
  #2
Feb 12th, 2007
Originally Posted by sarita.t View Post
I want to know the solution for creating a link in php page by making a directory in unix.?if somebody knows the answer kindly reply.

Thank you
I am not sure what precisely your question is - you want to use a php script to create a directory in a unix-like server, or, when you create a directory in the document tree, you need php to add a link to that directory?

Please advise and you'll get an answer.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 4
Reputation: hradek is an unknown quantity at this point 
Solved Threads: 0
hradek hradek is offline Offline
Newbie Poster

Re: create a php link by creating by making directory in unix

 
0
  #3
Feb 13th, 2007
Originally Posted by sarita.t View Post
I want to know the solution for creating a link in php page by making a directory in unix.?if somebody knows the answer kindly reply.

Thank you
Using PHP's mkdir function, also check if the directory exists. You can also use exec which can execute OS command line from within PHP. In either case, look at PHP's website for more info.

  1. $temp_path = "some_path/".$name_of_directory."/";
  2. if(!file_exists($temp_path))
  3. {
  4. mkdir($temp_path, 0777);
  5. echo "<a href=\"".$temp_path."\" target=\"_self\">Link Text</a>";
  6. }
Last edited by hradek; Feb 13th, 2007 at 8:32 pm. Reason: Typo
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC