PHP move_uploaded_file is Not uploading Images when full web path is given in Unix system

后端 未结 4 928
猫巷女王i
猫巷女王i 2020-12-12 05:09

My Following code is working fine when I set

$target = \"size_images/14_20131216231522_cashew.jpg\";

But Not Working

4条回答
  •  伪装坚强ぢ
    2020-12-12 05:14

    Try using:

    $target = $_SERVER['DOCUMENT_ROOT']."/size_images/14_20131216231522_cashew.jpg";
    

    If you want to upload from subdomain.mydomain.com to mydomain.com simply put the upload script on mydomain.com and then use a relative path.

提交回复
热议问题