im having a problem with my php script working on local host but failing to create a dir when i upload it to my server:
upload_file.php:
$img_tmp = $_FILES['pic']['tmp_name'];
$path = mkdir("../path/folder/$id", 0700);
$filename = "pic.jpg";
$location ="../path/folder/$id/";
$move_file = move_uploaded_file($img_tmp,$location.$filename);
the folder structure on server is similar.
FOLDER: path =>
FOLDER: folder =>
here the folder $id should be created.
FOLDER: upload_file =>
upload_file.php
can some one please advice to the problem/solution?
Please check the folder permission, folder permission should be 0777 to upload file.
So try setting the folder permission to 0777 or 0775
This should work.