Month: September 2014
-
Post Views: 17 1. What is the difference between echo(), print(), print_r()? echo() is a language structure, no return value The function of print() is basically the same as echo(), and it is also a language structure. The difference is that print has a return value, and always returns 1 print_r is a recursive print for output array objects 2.…
-
Post Views: 12 Recently found to open every timehttp://www.leshisz.com/的时候,总是出现如下界面: The error message means that the table is incorrect. It is recommended to repair the table. The solution used is to enter phpmyadmin, select the corresponding table, and then repair: The screenshots after the repair are as follows: The system is based on ecshop. It seems that the stats table still…
-
Post Views: 15 The code is as follows: //$data1 = file_get_contents(http://bbs.chengdu.cn/i_index_newdata.php?fids=202,238,239,240,241,242,259,271); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,http://bbs.chengdu.cn/i_index_newdata.php?fids=202,238,239,240,241,242,259,271); curl_setopt($ch, CURLOPT_RETURNTTransfer, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50); $data1 = curl_exec($ch); curl_close($ch); Since the content of the remote file is read, I finally decided to use curl to replace the file_get_contents, and the feeling speed and stability have…
