Writing /data1/apache/share/htdocs/wiki/data/cache/c/c3f9731def7388d55ea7f32e1e242a49.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /data1/apache/share/htdocs/wiki/data/meta/php%E7%BB%84%E4%BB%B6/%E5%BE%AE%E5%8D%9A%E8%AE%BF%E9%97%AE%E8%AF%B7%E6%B1%82%E7%B1%BB.meta failed
Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.
 
Writing /data1/apache/share/htdocs/wiki/data/cache/c/c3f9731def7388d55ea7f32e1e242a49.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /data1/apache/share/htdocs/wiki/data/cache/c/c3f9731def7388d55ea7f32e1e242a49.xhtml failed

HttpRequest

<?php
/*
 * 文件名称:
 * 摘    要: 用户请求
 * 作    者: linyi
 * 版    本: $id
 */	
class HttpRequest
{
	/*
	* url请求
	* data 为key=>的数组
	*/
	function urlRequest($url,$data,$method='get')
	{
		$temp = '';
		$method = strtolower($method);
		if (!empty($data) && $method != 'file')
		{
			foreach ($data as $key=>$v)
			{
				$temp .= '&'.$key.'='.$v;
			}
		}
		if ($method == 'file')
		{
			$temp = $data;
		}
		$ch = curl_init();
	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
		if ($method == 'post')
		{
			curl_setopt($ch, CURLOPT_POST, TRUE); 
			curl_setopt($ch, CURLOPT_POSTFIELDS, $temp);
		}
		else 
		{
			if (!empty($temp))
			{
				if (strpos($url,'?') === false )
				{
					$url .= '?';
				}
				$url .= $temp;
			}
		}
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  
	    curl_setopt($ch, CURLOPT_URL, $url);
	    $ret =curl_exec($ch);
	    curl_close($ch);
	    return $ret;
	}
}
php组件/微博访问请求类.txt · 最后更改: 2019/12/08 02:15 (外部编辑)
 
除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki