[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

write pro grm to create directory

Posted on 2005-05-07
2
Medium Priority
?
206 Views
Last Modified: 2006-11-18
how can I write pro gram to create directory ? where the name of directories are stay on file  "direct".
0
Comment
Question by:teera
2 Comments
 
LVL 12

Assisted Solution

by:str_kani
str_kani earned 600 total points
ID: 13950280
You can create a directory using mkdir function

Mode is ignored on Windows, and became optional in PHP 4.2.0.
syntax;
<?php
mkdir("/path/to/my/dir", 0700);
?>
Returns TRUE on success or FALSE on failure

Could you please tell me what you mean by -- where the name of directories are stay on file  "direct".



0
 
LVL 7

Accepted Solution

by:
Promethyl earned 600 total points
ID: 13950790
Some thing like th is?

<?php
$dirtocreate= 'mydir';
mkdir("/path/to".$dirtocreate, 0700);
$fp=fopen('direct','a+');
fwrite($fp,"$dirtocreate\n");
fclose($fp);
?>
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month19 days, 17 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question