Jump to content

Need mkdir() help


sweinkauf13

Recommended Posts

Hello,I am writting a script to create a new directory. Very simple but I cant figure out why it isnt working. Here is the script:

<?#$ndir = "$_POST[ndir]";#if($ndir != ""){mkdir("$ndir");}?>

Thanks in advance,YoungwebmasterOh, also I am trying to do the same thing with creating a new file and this script goes like this:

<?#$nfile = "$_POST[nfile]";#if($nfile != ""){$handle = fopen("$nfile","a");}?>

Link to comment
Share on other sites

Is the script's directory writeable? Try changing the permissions to 0777. By the way, the first assignment should look like:

$ndir = $_POST['ndir'];/* or */ $ndir = "{$_POST['ndir']}";

Link to comment
Share on other sites

Thank you and yes it was I was supose to be using the ftp functions and not the regular functions for file control. It works now. Thank you,Youngwebmaster

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...