Home  >  Article  >  Backend Development  >  php-PHP上传图片问题上传到C的图片无法显示

php-PHP上传图片问题上传到C的图片无法显示

WBOY
WBOYOriginal
2016-06-02 11:34:121217browse

php

PHP 上传图片为什么上传到C盘图片无法显示上传到其他盘图片可以显示呢?
代码哪个地方写错了?请指正。。。。
前端代码:




文件上传



上传文件的用户名:





后端代码;
$usename = $_POST["usename"];
echo "
";<br>    print_r($_FILES);<br>    echo"
";
if(is_uploaded_file($_FILES["myfile"]["tmp_name"]))
{
$uploat =$_FILES["myfile"]["tmp_name"]; //默认上传文件的位置
//把上穿文件放在你希望的位置
$move_to_file=$_SERVER["DOCUMENT_ROOT"]."/Ajax/PHPdom/image/".$_FILES["myfile"]["name"];
<code>    if(move_uploaded_file($uploat,$move_to_file))    {        echo "文件".$_FILES["myfile"]["name"]."上传成功";    }    else    {        echo "文件上传失败";    }}</code>

?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn