Jump to content

Mkdir


i am java
 Share

Recommended Posts

mkdir("/home/public_html/upload/".$gal[g_id], 0777);

Anyone know why when I use this code, the directory that is made not only doesn't set permissions to 0777, but it also won't allow me to change it to 0777 manually?Edit: OK, so, I used chmod to change its permissions. It worked. Unfortunately, I still can't use move_uploaded_file() to move files into the directory..

Edited by i am java
Link to comment
Share on other sites

I thought file permissions were only 3 digits, i.e. 777Edit: I'm wrong. There is something about the function not working right in windows if there are spaces in the filenames tho, I don't know if that's applicable here

Edited by chibineku
Link to comment
Share on other sites

I thought file permissions were only 3 digits, i.e. 777Edit: I'm wrong. There is something about the function not working right in windows if there are spaces in the filenames tho, I don't know if that's applicable here
It's a Linux server. I think it may have something to do with the safe mode that my host uses or something.Oh, and I am just curious: Do PHP errors display on the pages, or was there a change in cPanel or PHP that made it so that you can only view PHP errors in an error log?
Link to comment
Share on other sites

[Wed Sep 23 14:09:54 2009][Wed Sep 23 14:09:54 2009] [error] [client 68.205.137.212] PHP Warning:  move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/php40K2ey' to '/upload/35/ignore.bmp' in /home/jasenand/public_html/member_gallery.php on line 433,  [error] [client 68.205.137.212] PHP Warning:  move_uploaded_file(/upload/35/ignore.bmp) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: No such file or directory in /home/jasenand/public_html/member_gallery.php on line 433, referer:

That's the two error messages I get when trying to upload a file into there using PHP/HTML.

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...