- 博客(7)
- 收藏
- 关注
转载 Session,Cookie
Cookie <?php unset($username); if ($_COOKIE['login']) { list($c_username,$cookie_hash) = split(',',$_COOKIE['login']); if (md5($c_username.$secret_word) == $cookie_hash) { $username =
2016-12-11 16:23:36
147
转载 socket
// Client // 设置错误处理 error_reporting (E_ALL); // 设置处理时间 set_time_limit (0); $ip = "127.0.0.1"; // IP 地址 $port = 1013; // 端口号 $socket = socket_create (AF_INET, SOCK_STREAM
2016-09-30 17:49:20
165
原创 PHP字符串
$str = file_get_contents('text.txt'); $str2 = "haha haha\r\nhaha\r\n\r\nhaha haha"; $str=$str2; text.txt haha haha haha haha haha
2016-07-14 10:13:40
194
原创 Yii render
ob_start();//开启输出缓冲区 ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_);//包含php脚本文件 return ob_get_clean();//关闭输出缓冲区并返回输出缓冲区内容
2016-07-12 16:37:54
302
转载 xml
xml to array $xmlstring = <<<XML login imdonkey XML; $xml = simplexml_load_string($xmlstring); $json = json_encode($xml); $array = json_decode($json,TRUE); array to xml $arr = array( 'nam
2016-07-01 16:17:02
170
原创 curl
curl http get private function getHttpResponseGET($url) { $curl = curl_init($url); curl_setopt($curl,CURLOPT_TIMEOUT, 20); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);// 显示输出结果 curl_setopt($cur
2016-06-17 12:18:49
176
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人