duansai1314 2011-05-18 04:57
浏览 1199
已采纳

文件上传 - 我需要在PHP中找到tmp_name的绝对(完整)路径

While upload a file i will get the tmp_name in the array, I need to find the absolute (full) path of the tmp_name that means in which path the file is there( like var/www/sample/tmp/phpekIgfr)

Array
(
    [name] => profile.jpg
    [type] => image/jpeg
    [tmp_name] => /tmp/phpekIgfr
    [error] => 0
    [size] => 44288
)
  • 写回答

1条回答 默认 最新

  • duanshaiduhao2471 2011-05-18 05:02
    关注

    tmp_name will always contain the full path.

    /tmp/phpeklgfr points to the uploaded file in the root /tmp directory. It does not reside in /var/www/sample/tmp.

    You can change the location PHP stores temporary files in using the upload_tmp_dir php.ini setting.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换