05 2020 档案

摘要:json返回的是一串数据;而jsonp返回的是脚本代码(包含一个函数调用); JSON其实就是JavaScript中的一个对象,跟var obj={}在质上完全一样,只是在量上可以无限扩展。简单地讲,json其实就是JavaScript中的对象(Object)和数组(Array,其实也是对象)这倆好 阅读全文
posted @ 2020-05-29 14:58 橱窗外的小孩 阅读(245) 评论(0) 推荐(0)
摘要:POST请求: public function postUrl($url, $postData = false, $header = false) { $ch = curl_init($url); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch, 阅读全文
posted @ 2020-05-25 10:00 橱窗外的小孩 阅读(175) 评论(0) 推荐(0)
摘要:本地图片预览 第一种方法 <!DOCTYPE html <html <head <meta http equiv="Content Type" content="text/html; charset=utf 8" <script type="text/javascript" function cha 阅读全文
posted @ 2020-05-21 13:52 橱窗外的小孩 阅读(509) 评论(0) 推荐(0)
摘要:__construct()是php内置的构造函数,__initialize()是php框架中定义的(如thinkphp),用法基本一致。区别:子类的__initialize方法自动调用父类的__initialize方法。(thinkphp)更正:在tp中若父类和子类都有_initialize,则只调 阅读全文
posted @ 2020-05-07 09:33 橱窗外的小孩 阅读(1165) 评论(0) 推荐(0)