Unable to access php.ini

Yes, you need the root access to your domain.

EDIT: All I mean if we just use blank instead of specifying directory is best especially when you move up one level or down one level of a directory.

Actually the name of the table has to be made from encrypted characters. I don’t have any problem with the mkdir because the folder is actually existing but the only problem is with the image because it is not being uploaded.

Are you using file upload then send it to someones email?

What?

The code did not worked.

The problem is your directory inside $tablename.
You should not use illegal characters in your directory’s name. It may cause the server confused and will result in 404 error even though that folder is existed.

Try to browse your directory created with illegal characters (@, !, etc…) and you will notice the file will not be found.

Then try to create and browse your directory without these illegal characters. Then you will notice it will work.

If you dont believe us, try do some research in Google.

4 Likes

Thanks the things you listed really worked for me.
The first thing you told that the file is already in the folder so do not type that htdocs/.
And you not to use special characters so I changed the encoding and force the code to use only numbers and alphabets.
And at last I came up with the following code:

$tablename = "qwert12345asdfg6789";
    mkdir("users/".$tablename);
  $errors= array();
  $file_name = $_FILES['image']['name'];
  $file_tmp =$_FILES['image']['tmp_name'];
  $extensions= array("jpeg","jpg","png");
  move_uploaded_file($file_tmp,"users/".$tablename."/".$file_name);
1 Like

Congratts! :v:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.