0
我要導入CSV文件,所以我寫我的PHP代碼,它的功能很好,但因爲我補充一下我得到這個錯誤:致命錯誤:未捕獲的類型錯誤:參數1傳遞給exception_handler()
''Fatal error: Uncaught TypeError: Argument 1 passed to exception_handler() ...''
$parts = explode(',', $tmp[6]);
$fachrichtung = sistr($parts[1],'LA', true);
if ($fachrichtung == 'LA'){
$fachrichtung = 'Lehramt' ;
} else {
$fachrichtung = substr($parts[0],strrpos($parts[0], " "));
}
我的查詢功能運作良好沒有上面的代碼,但我需要它。
查詢:..... '".utf8_encode (trim($fachrichtung,"""))."'
,.......
爲什麼我的錯誤?
1.請發佈$ parts的var_dump()。 2. * sistr *不會出現在PHP函數中。你的意思是* substr *? – DrDamnit