![](https://xisto.com/discuss/uploads/set_resources_4/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
lnljamat
-
Content Count
4 -
Joined
-
Last visited
Posts posted by lnljamat
-
-
Hi!
The error message clearly indicates that it is a problem with the permissions on the directory. If you use an FTP client to set permissions on your files and directories, you might want to try going to the directory where you want to create the folder and assign permissions using the CHMOD command or the equivalent of a graphical tool.
If you do not have an FTP interface, the file manager web interface that your hosting provider presents you with for uploading files should have some way of setting permissions.
If all else fails, you ought to contact your hosting provider - their support staff should be experienced in dealing with such problems on a day-to-day basis as it is fairly common.
Thank you Very much!!!
that was the problem, i needed to change the permissions and then was able to upload!!
thanks again-
now im facing another problem- when i try to delete files from ftp it says that permission is not granted, so i have to make a php script unlink() to delete files from the server- could u please explain why that happens? i thought when i log in with ftp i am the super user, and through php script that should be the normal user?
Thanks again
-
I have not tested your code but ../../ is redundant. ../ goes to your root directory (public_html) by default. You're calling it twice.
And I'm not sure if you should combine POST with your variable assignment. Again, I have not tested out.
What I do know is
$section_name = $_POST['section_name']; $folderpath = "../content/$section_name"; mkdir($foltherpath);
Should work because I use it that way in my script.
Thanks for ur replyhowever, the directory where im executing this function is at an even lower level, and doesn't "../" take u up one level?
anyways i get this error:
and when i try to do it with ur code i get an error that no such file or directory existsWarning: mkdir() [function.mkdir]: Permission denied in /home/lnljamat/public_html/admin/pagemanagement/sectionedit2.php on line 86
Thanks
-
Hi,
Ive got a freehosting site at qupis.com,
and ive made a php site on my computer (running apache with php -installed using xampp)
in this site the user has the option to create directories and files
it was working fine on my local computer, but now that ive put it online on qupis, the mkdir() funciton doesnt work, i.e. it doesnt create a directory.
this is the actual code :$folderpath = "../../content/"."$_POST[section_name]";mkdir($folderpath);
do u need to have some parameters with mkdir? or is it switched off in phpinfo(), so that u cant make a directory directly from the server?
any help on this would be greatly appreciated!!
Mkdir() Not Working In Php Help with php function mkdir()
in Programming
Posted · Report reply
Is there anyway to create permission when i create files and folders from php?