12 2014 档案

摘要:总体类Json数据处理/** *json format data *@param integer $code status code *@param string $message message data *@param array $data *return string */ publi... 阅读全文
posted @ 2014-12-31 11:05 valentine is me 阅读(146) 评论(0) 推荐(0)
摘要:单例访问数据库class Db{ static private $_instance; static private $_connectSource; private $_dbConfig=array( 'host'=>'127.0.0.1', 'user'=>'root', 'passwor... 阅读全文
posted @ 2014-12-31 10:45 valentine is me 阅读(146) 评论(0) 推荐(0)
摘要:1.json仅支持UTF-8格式数据,非UTF-8格式数据转换后返回NULL;2.状态码,服务器端提供状态码供客户端识别。3.提示信息,如登陆成功,刷新成功,上传失败。4.Restful API设计指南:这里5.XML格式返回数据,需要加头信息,使得浏览器使用XML格式显示出结果header("Co... 阅读全文
posted @ 2014-12-24 16:13 valentine is me 阅读(216) 评论(0) 推荐(0)
摘要:XML包含四种方法,分别为拼接、PHP拼接(DOM、AppendChild..)、SimpleXML、XMLWriter//return xml format datapublic function read_get_xml(){// header("Content-type:text/xml");... 阅读全文
posted @ 2014-12-24 14:16 valentine is me 阅读(197) 评论(0) 推荐(0)
摘要:简单示例 Canvas not supported 注意:canvas默认大小为300*150像素注意:实用width与height而非css设置canvas的大小效果: 阅读全文
posted @ 2014-12-23 13:20 valentine is me 阅读(184) 评论(0) 推荐(0)
摘要:CURL PHP API comes with a wide array of options and features. This allows users to fine tune the requests and the way that the responses are handled.P... 阅读全文
posted @ 2014-12-16 11:08 valentine is me 阅读(210) 评论(0) 推荐(0)
摘要:$objSoapClient=new SoapClient("http://www.webxml.com.cn/Webservices/WeatherWebService.asmx?wsdl");$params=array('theCityName'=>'北京');$out=$objSoapClie... 阅读全文
posted @ 2014-12-12 10:43 valentine is me 阅读(134) 评论(0) 推荐(0)
摘要:find / -name filename 阅读全文
posted @ 2014-12-01 14:10 valentine is me 阅读(189) 评论(0) 推荐(0)