我一直得到这两个错误无法打开流和无法移动

时间:2013-02-19 08:18:48

标签: php sql

  

警告:move_uploaded_file(../ upload / fileupload / desig.csv)[function.move-uploaded-file]:无法打开流:D:\ wamp \ www \ STAPP \ uploads \中没有此类文件或目录第11行的up.php

     

警告:move_uploaded_file()[function.move-uploaded-file]:无法在D:\中将'D:\ wamp \ tmp \ php404.tmp'移动到'../upload/fileupload/desig.csv'第11行的wamp \ www \ STAPP \ uploads \ up.php

这是代码

<?PHP
    require_once('../includes/database_connection.php');
    $conn=odbc_connect('stapp','','');

    if(isset($_POST['filesubmit']))
    {
    $file=$_FILES['uploadedfile']['name'];
    $tmp_file=$_FILES['uploadedfile']['tmp_name'];
    $filename='../upload/fileupload/'.$file;
    if(move_uploaded_file($tmp_file,$filename))
    {
    echo $filename;
    exit;

    $query="LOAD DATA LOCAL INFILE '$filename' INTO TABLE `devicemaster`     FIELDS            TERMINATED BY ',' LINES TERMINATED BY '\\r\\n'(devicecode,devicename,devicecompany)";
         $rs1=odbc_exec($conn,$query); 

        $string = "File Uploaded Successfully";


    }
    else
    {
        $string =  "there is a error uploading the file please try again";
    }
}
?>

0 个答案:

没有答案