sweinkauf13 Posted April 30, 2010 Share Posted April 30, 2010 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 More sharing options...
Synook Posted April 30, 2010 Share Posted April 30, 2010 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 More sharing options...
sweinkauf13 Posted May 1, 2010 Author Share Posted May 1, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.