doushantun0614 2017-05-03 06:27
浏览 228

move_uploaded_file无法在Windows服务器上运行

I know this question is so common in stackoverflow and many questions are available on this topic, but still I did not match any answer solving my strange prblem.

$path = "img/"
$tmp = $_FILES ['footer-bg-img'] ['tmp_name'];
move_uploaded_file ( $tmp, $path . $actual_image_name );

its working fine on my local system both WAMP and XAMPP application, but on my windows web server it returns false, which makes me strange, on my web server I printed the function output, it gives me

string(27) "C:\Windows\Temp\phpAA55.tmp" string(21) "/img/20131208_bjp.jpg" bool(false) dead

I have asked the service provider to give the img folder 0777 permission, they told me they have done that. But having still same problem, now should I contact the service provider or there could be coding error, please suggest.

  • 写回答

1条回答 默认 最新

  • dongtou8736 2017-05-03 06:56
    关注

    I still think its a permissions issue. Please have a look at the following topic: move_uploaded_file() returns false

    You can also check the permissions to the directory with PHP function:

    if ( ! is_writeable ( $path ) )
    {
        echo 'Can\'t write to directory, insufficient permissions.';
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?