我寫(xiě)了這樣的PHP代碼$site="http://www.google.com";$content = file_get_content($site);echo $content;但當(dāng)我刪除“http://”時(shí),$site我收到以下警告:警告:file_get_contents(www.google.com)[function.file-get-contents]:無(wú)法打開(kāi)流:我嘗試過(guò)try,catch但它沒(méi)有用。
如何在PHP中處理file_get_contents()函數(shù)的警告?
幕布斯6054654
2019-09-19 08:41:26