Im做LOAD DATA INFILE我有了這個代碼笨3,LOAD DATA INFILE,fcpath
move_uploaded_file($file_temp,"uploads/master_listing/".$file_name);
$file_path = FCPATH.'/uploads/master_listing/'.$file_name;
$this->db->query("LOAD DATA LOCAL INFILE '".$file_path."'
INTO TABLE fsi_temp_newmasterlist
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\\n'
IGNORE 1 LINES
(SEQUENCENUMBER,NAME,ADDRESS,PICKUPDATE,ENCODERNO,BARCODEVALUE,REMARKS,CLIENT,PROD)
");
我不知道什麼是錯在代碼中,我得到了錯誤Can't find file
這裏是我的文件位置myfolder/uploads/master_listing/
我的CSV文件的SEQUENCENUMBER,NAME,ADDRESS,PICKUPDATE,ENCODERNO,BARCODEVALUE,REMARKS,CLIENT,PROD
我真的需要幫助的表頭..在此先感謝。
'回聲$ file_path'和檢查 –
我得到這個C:\ xampp5.5 \ htdocs中\ joel_fsi \ fsi2 /上傳/ master_listing/testfileupload.csv –
我已經更換位置真正的路徑,但它仍然給我錯誤LOAD DATA LOCAL INFILE'C:\ xampp5.5 \ htdocs \ joel_fsi \ fsi2 \ uploads \ master_listing \ testfileupload.csv' –