Jump to content

Can't get mkdir() to work


Bogey
 Share

Recommended Posts

I have tried all of the next: mkdir('test/')mkdir('test') chdir('../');$albumfolder = getcwd() . '/secure';mkdir($albumfolder); chdir('../');$albumfolder = getcwd() . '/secure/';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/secure';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/secure/';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/public_ftp/secure/';mkdir($albumfolder); Also tried the 0777 value... NOTHING worked!Any help? ;)

Edited by Bogey
Link to comment
Share on other sites

Also tried the 0777 value...
If PHP doesn't have enough permissions, it might even miss the permission to set permissions. You may have to set 0777 permissions from another place (e.g. a shell, or a control panel provided by your host).
Link to comment
Share on other sites

So the reason I can't make dirs, is cause of to little permission by PHP?
Most likely, yes. The other possibility is a buggy PHP version, but either way, it's not something you can fix in your PHP code.And yes, the reason some hosts forbid this is for security. Most of them however don't disable it completely. They just disable it by default, and let you enable it if you need it, hence my earlier comment about a shell or a control panel.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...