how can i write the php to create folder

How can i write progrm in php to check to show all file indirectory ?  
teeraAsked:
Who is Participating?
 
sajuksConnect With a Mentor Commented:
//simple example
do u want to create folder or show all files in directory , ur title and context are different ?
to create direc http://www.php.net/manual/en/function.mkdir.php
<?php
mkdir("/path/to/my/dir", 0700);
?>

<?php
$this_path = getcwd();
if ($handle = opendir($this_path)) {
    echo "Files:<br>\n";
    while (false !== ($file = readdir($handle))) {
      if ($file != "." && $file != ".." && $file != "index.php") {
        echo "$file<br>\n";
       }
    }
    closedir($handle);
}
?>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.