944,016 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2235
  • PHP RSS
Feb 8th, 2007
0

create a php link by creating by making directory in unix

Expand 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sarita.t is offline Offline
2 posts
since Feb 2007
Feb 12th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by sarita.t ...
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.
Reputation Points: 21
Solved Threads: 26
Posting Whiz in Training
Rhyan is offline Offline
240 posts
since Oct 2006
Feb 13th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by sarita.t ...
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.

PHP Syntax (Toggle Plain Text)
  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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hradek is offline Offline
4 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Hi! Some noob silly questions
Next Thread in PHP Forum Timeline: Redirection





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC