Alas, a picture moderation method was found on the project all night and quickly went to the server to detect the problem.
<?PHP$ Img_exists=Get_headers($ PIC, 1);If(!Empty($ Img_exists)&&$ Img_exists[0] = 'HTTP/1.1 200 OK '&&$ Img_exists['Content-length']! = 18771){$ Model_show. = '$ PIC. '"Width =" 438 "type =" codeph "text ="/codeph "/>';}?>
It is strange that it is very slow to go to the server. Previously, the system used file_get_contents to change it to get_header. After the program went online, it was slow.
Baidu curl _ is much faster than get_header. A try is really good.
<? PHP $ Ch = Curl_init (); // Start a curl session Curl_setopt ( $ Ch , Curlopt_header, 1 ); // The returned header area is not displayed. Curl_setopt ( $ Ch , Curlopt_nobody, True ); Curl_setopt ( $ Ch , Curlopt_returntransfer, True ); Curl_setopt ( $ Ch , Curlopt_url, $ PIC ); $ HD = Curl_exec ( $ Ch ); If (! Empty ( $ HD )&&! Strpos ( $ HD , 'Content-length: 18771' )){ $ Model_show . = ' $ PIC . '"Width =" 438 "type =" codeph "text ="/codeph "/>' ;} ?>
The efficiency of recommended getimagesize is also good. However, you can try it if you have time limitations.