note 63349 deleted from function.mkdir by nlopess
| From: | nlopess@php.net | Date: | Mon, 20 Mar 2006 21:58:53 +0000 |
| Subject: | note 63349 deleted from function.mkdir by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106119@lists.php.net to get a copy of this message | ||
Note Submitter: hmaster
Reason: useless
----
Create directory in a specific folder other then your own using a GET variable:
<?php
createdir(@$_GET['cat']);
function createdir($cat) {
$imdir = "images/path/boo/";
$dirtomk = $cat;
mkdir($imdir.$dirtomk, 0700);
}
?>
I also tried to make multiple folders on one request:
<?php
createdir(@$_GET['cat']);
function createdir($cat) {
$imdir = "gallery/images/";
$timdir = "gallery/thumbs/";
$dirtomk = $cat;
mkdir($imdir.$dirtomk, 0700);
mkdir($timdir.$dirtomk, 0700);
}
?>
Simple yet it works :)