Creating a directory

From: Date: Fri, 12 Nov 2004 08:54:52 +0000
Subject: Creating a directory
Groups: php.general 
Request: Send a blank email to php-general+get-201827@lists.php.net to get a copy of this message
What's the best way to create a directory with PHP, I tried using: if (array_exists('dir',$_POST)) { $dir_name = test123; shell_exec('mkdir $dir_name'); I don't want to have to declare a variable, I would like to do this all on one line. Like: shell_exec('mkdir $_POST['dir']'); // but it don't work } else { print "Get get some coffee!"; } I'll be putting some error checking in later :) Thanks, Dan.

« previous php.general (#201827) next »