•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,952 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,276 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1223 | Replies: 2
![]() |
•
•
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation:
Rep Power: 2
Solved Threads: 7
•
•
•
•
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.
•
•
Join Date: Feb 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
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)
$temp_path = "some_path/".$name_of_directory."/"; if(!file_exists($temp_path)) { mkdir($temp_path, 0777); echo "<a href=\"".$temp_path."\" target=\"_self\">Link Text</a>"; }
Last edited by hradek : Feb 13th, 2007 at 7:32 pm. Reason: Typo
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Disabling PHP Safe Mode for a specific directory (PHP)
- PHP Link Exchange (Existing Scripts)
- Open In New Window Php (PHP)
- How To Create A Free Web Host (PHP)
- Link Exchange with Online Directory (Relevant Link Exchanges)
Other Threads in the PHP Forum
- Previous Thread: Hi! Some noob silly questions
- Next Thread: Redirection


Linear Mode