I am attempting to do my own manual manual upload of a file in a WordPress template page. But Im getting this error.

Warning: move_uploaded_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0

    $UploadDirectory    =  get_option("siteurl").'/wp-content/uploads/2014/cert-temp/';
    if(move_uploaded_file($_FILES['FileInput']['tmp_name'], $UploadDirectory.$NewFileName ))
   {
    // do other stuff
           die('Success! File Uploaded.');
   }else{
    die('error uploading File!');
   }

Unfortunately I do not have access to the php.ini file to change settings as we dont manage the servers ourselves, is there any other way of working around this?

I have tried adding php_value allow_url_fopen On into the .htaccess file but that didnt work.

Thank you.

Read more here: move_uploaded file not working in wordpress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: