0
我使用phpQuery從基於用戶輸入的頁面刮取一些信息,但我試圖設置錯誤處理,如果用戶輸入一些不存在的東西。phpQuery錯誤處理
例如,用戶輸入不正確的產品數量可能會導致
Warning: file_get_contents([function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in
我可以在if語句中使用什麼在這樣一個實例來檢查phpQuery錯誤?
例如
if(...error...){
echo json_encode("error" => 'Incorrect value entered');
}