Repository navigation
Expand file tree
/
Copy path15-php-func-note.html
More file actions
328 lines (208 loc) · 10.4 KB
/
Copy path15-php-func-note.html
File metadata and controls
328 lines (208 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-language" content="zh-cn">
<meta name="baidu-site-verification" content="Gd5KTNrHMH" />
<title>php-func-note PHP函数笔记 | 爱编程</title>
<meta name="author" content="gangzi">
<meta name="description" content="一个互联网从业者的个人博客,喜爱编程,注重用户体验,在这里记录工作和生活点滴!">
<meta name="keywords" content="php, php函数,php,mysql,apache,linux,js,JavaScript,Web,前端">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:title" content="php-func-note PHP函数笔记"/>
<meta property="og:site_name" content="爱编程"/>
<meta property="og:image" content="undefined"/>
<link href="/favicon.ico" rel="icon">
<link rel="alternate" href="/atom.xml" title="爱编程" type="application/atom+xml">
<link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script src="/js/jquery.min.js"></script>
</head>
<body>
<!--[if lte IE 8]> <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;margin:0 auto;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0027_Simplified Chinese.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." style='margin-left:auto;margin-right:auto;display: block;'/></a></div> <![endif]-->
<header id="header" class="inner"><div class="alignleft">
<h1><a href="/">爱编程</a></h1>
<h2><a href="/">记录工作和生活点滴</a></h2>
</div>
<nav id="main-nav" class="alignright">
<ul>
<li><a href="/">首页</a></li>
<li><a href="/categories/essay/">随感</a></li>
<li><a href="/categories/tech/">技术</a></li>
<li><a href="/categories/php/">php</a></li>
<li><a href="/categories/js/">js</a></li>
<li><a href="/categories/life/">生活</a></li>
<li><a href="/archives">归档</a></li>
</ul>
<div class="clearfix"></div>
</nav>
<div class="clearfix"></div></header>
<div id="content" class="inner">
<div id="main-col" class="alignleft"><div id="wrapper"><article class="post">
<div class="gallery">
<div class="photoset">
<img src="">
</div>
<div class="control">
<div class="prev"></div>
<div class="next"></div>
</div>
</div>
<div class="post-content">
<header>
<time datetime="2015-03-15T03:37:36.000Z"><a href="/2015/03/15-php-func-note.html">2015-03-15</a></time>
<h1 class="title">php-func-note PHP函数笔记</h1>
</header>
<div class="entry">
<p>PHP函数笔记<br><a id="more"></a></p>
<h4 id="小心坑">小心坑</h4><ol>
<li>http_build_query 会对参数做 urlencode(),项目中做sign时,被坑过;</li>
<li></li>
</ol>
<h4 id="你不知道的事">你不知道的事</h4><ol>
<li>json_decode($post,true)<br> 第二个参数能保证解析出来时array格式</li>
<li>file_get_contents(‘php://input’)<br> 当你使用 $_POST $_GET 甚至是 $_REQUEST 得不到内容时,$post = file_get_contents(‘php://input’); 得到 http body内容</li>
</ol>
</div>
<footer>
<div style="padding:16px 0 16 0;">
<iframe src="http://rcm-cn.amazon-adsystem.com/e/cm?t=lvcodecom-23&o=28&p=13&l=ez&f=ifr&f=ifr" width="468" height="60" scrolling="no" marginwidth="0" marginheight="0" border="0" frameborder="0" style="border:none;"></iframe>
</div>
<div class="alignleft post-nav">
<em>上一篇: </em><a href="/2015/04/01-hello-world.html">Hello World</a>
</div>
<div class="alignright post-nav">
<em>下一篇: </em><a href="/2015/01/28-算法的时间复杂度.html">算法的时间复杂度</a>
</div>
<div class="clearfix"></div>
<div class="copyright">
<span class="claim">版权声明:自由转载-非商用-无演绎-保持署名 @ Creative Commons BY-NC-ND 3.0</span>
<span class="from-link">
<em>本文链接地址:</em>
<a href="/2015/03/15-php-func-note.html">
http://lv-code.com/2015/03/15-php-func-note.html
</a>
</span>
</div>
<div class="categories">
<a href="/categories/php/">php</a>
</div>
<div class="tags">
<a href="/tags/php/">php</a>
</div>
<div class="clearfix"></div>
</footer>
</div>
</article>
</div></div>
<aside id="sidebar" class="alignright">
<div class="search">
<form action="//google.com/search" method="get" accept-charset="utf-8">
<input type="text" name="q" results="0" placeholder="搜一下">
<i class="icon-search"></i>
<input type="hidden" name="q" value="site:lv-code.com">
</form>
</div>
<div class="widget tag">
<h3 class="title">标签</h3>
<ul class="entry">
<li><a href="/tags/NoSQL/">NoSQL</a><small>1</small></li>
<li><a href="/tags/ORM/">ORM</a><small>1</small></li>
<li><a href="/tags/android/">android</a><small>4</small></li>
<li><a href="/tags/apache/">apache</a><small>1</small></li>
<li><a href="/tags/aptana/">aptana</a><small>1</small></li>
<li><a href="/tags/codeigniter/">codeigniter</a><small>3</small></li>
<li><a href="/tags/docker/">docker</a><small>2</small></li>
<li><a href="/tags/hexo/">hexo</a><small>6</small></li>
<li><a href="/tags/js/">js</a><small>1</small></li>
<li><a href="/tags/linux/">linux</a><small>1</small></li>
<li><a href="/tags/mac/">mac</a><small>2</small></li>
<li><a href="/tags/mysql/">mysql</a><small>4</small></li>
<li><a href="/tags/php/">php</a><small>4</small></li>
<li><a href="/tags/uml/">uml</a><small>1</small></li>
<li><a href="/tags/vim/">vim</a><small>1</small></li>
<li><a href="/tags/代码审查/">代码审查</a><small>1</small></li>
<li><a href="/tags/你的灯亮着吗-booknote/">你的灯亮着吗, booknote</a><small>1</small></li>
<li><a href="/tags/健身/">健身</a><small>1</small></li>
<li><a href="/tags/反射机制/">反射机制</a><small>1</small></li>
<li><a href="/tags/开源项目/">开源项目</a><small>1</small></li>
<li><a href="/tags/微信/">微信</a><small>1</small></li>
<li><a href="/tags/数据结构/">数据结构</a><small>1</small></li>
<li><a href="/tags/算法/">算法</a><small>3</small></li>
<li><a href="/tags/读书/">读书</a><small>1</small></li>
<li><a href="/tags/超级快速阅读-booknote/">超级快速阅读, booknote</a><small>1</small></li>
</ul>
</div>
<div class="widget tag">
<h3 class="title">最新文章</h3>
<ul class="entry">
<li>
<a href="/2016/05/03-booknote-2-超级快速阅读.html">booknote-2-超级快速阅读</a>
</li>
<li>
<a href="/2016/04/28-booknote-你的灯亮着吗.html">booknote-你的灯亮着吗,发现问题的真正所在</a>
</li>
<li>
<a href="/2016/04/27-opensource.html">opensource 开源项目整理</a>
</li>
<li>
<a href="/2015/09/25-linux-cmd-note.html">linux-cmd-note</a>
</li>
<li>
<a href="/2015/09/15-php-ci-upgrade2-to-3.html">CI 2.x升级到3.x</a>
</li>
<li>
<a href="/2015/05/20-mac-docker-note.html">mac-docker-note mac使用docker搭建php nginx</a>
</li>
<li>
<a href="/2015/05/20-mac-vagrant-note.html">mac-docker-note mac使用docker搭建php nginx</a>
</li>
<li>
<a href="/2015/05/09-aptana-studio3-ide.html">aptana-studio3-ide aptana使用笔记</a>
</li>
<li>
<a href="/2015/05/04-js-event-bubble.html">js-event-bubble js时间冒泡和捕获</a>
</li>
<li>
<a href="/2015/04/19-hexo-快速编辑新文章.html">hexo-快速编辑新文章</a>
</li>
<li>
<a href="/2015/04/19-vim-note.html">vim-note vim使用笔记</a>
</li>
<li>
<a href="/2015/04/19-hexo-sshkey.html">hexo-sshkey 多个sshkey的问题</a>
</li>
</ul>
</div>
<div class="widget tag">
<h3 class="title">友情链接</h3>
<ul class="entry">
<li>
<a href="http://www.arkulo.com/" target="_blank">平静的技术</a>
</li>
<li>
<a href="http://liangxifeng.com/" target="_blank">Lxf's blog</a>
</li>
</ul>
</div>
<SCRIPT charset="utf-8" type="text/javascript" src="http://ws-cn.amazon-adsystem.com/widgets/q?rt=tf_mfw&ServiceVersion=20070822&MarketPlace=CN&ID=V20070822%2FCN%2Flvcodecom-23%2F8001%2F02cff670-9b8b-498a-a01c-4bf20954967f"> </SCRIPT> <NOSCRIPT><A HREF="http://ws-cn.amazon-adsystem.com/widgets/q?rt=tf_mfw&ServiceVersion=20070822&MarketPlace=CN&ID=V20070822%2FCN%2Flvcodecom-23%2F8001%2F02cff670-9b8b-498a-a01c-4bf20954967f&Operation=NoScript">Amazon.cn Widgets</A></NOSCRIPT>
</aside>
<div class="clearfix"></div>
</div>
<div id="go-pg-top"><i class="icon-arrow-up"></i></div>
<footer id="footer" class="inner"><div class="alignleft">
© 2016 gangzi
<script type="text/javascript">
var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1254749423'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s11.cnzz.com/stat.php%3Fid%3D1254749423%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>
<div class="clearfix"></div>
</footer>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/page.js"></script>
</body>
</html>