Php 图片上传错误

Php 图片上传错误,php,Php,我已经在“cms/user/prescriptionimg”位置创建了目录,但上传文件时出错 Warning: move_uploaded_file(../cms/user/prescriptionimg/11500004-21000002-13165874331.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/oxfordmo/public_html/c

我已经在“cms/user/prescriptionimg”位置创建了目录,但上传文件时出错

 Warning: move_uploaded_file(../cms/user/prescriptionimg/11500004-21000002-13165874331.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/oxfordmo/public_html/cms/user/prescription.php on line 113

 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpdCWdaR' to '../cms/user/prescriptionimg/11500004-21000002-13165874331.jpg' in /home/oxfordmo/public_html/cms/user/prescription.php on line 113

 Unable to move user 11500004-21000002-13165874331's picture to prescription directory
关于这个的脚本是

  if (file_exists("../cms/user/prescriptionimg/$username.$ext")) 
    {unlink("../cms/user/prescriptionimg/$username.$ext"); }
  if (!move_uploaded_file($_FILES["scaninput".$i]['tmp_name'],"../cms/user/prescriptionimg/$username.$ext")) 
            { die("Unable to move user $username's picture to prescription directory"); }

使用此函数检索根路径

 $root = realpath($_SERVER["DOCUMENT_ROOT"]);


                  //-----------------------------------
                  // require the functions file
                  //-----------------------------------
                  //require ("$root/php/funkshions.php");