PHP Debug小结

WBOY
WBOYOriginal
2016-06-13 12:52:47878browse

PHP Debug总结
?
1.log信息输出
  file_put_contents()
  eg.file_put_contents("/opt/123.txt", $finalPath ."+++". $imagePath, FILE_APPEND);
  out_put_json()
  echo()
  print_r()


2.php扩展安装

http://wikiserver.spreadtrum.com/Projects/SoftwareSystem/wiki/market

注:查看php扩展安装信息用phpinfo()函数。

3.CI url带参数,参数有中文的需要url_encode

4.php性能优化与测试

--------------------------------------------
|    ----------------------------------     |
|    |    前端(JS/CSS/Images)          |     |
|    ----------------------------------     |
|    ----------------------------------     |
|    |              PHP               |     |
|    |    --------------------------- |     |
|    |    |      编码最佳实践         | |     |
|    |    --------------------------- |     |
|    |    --------------------------- |     |
|    |    |    变量/数据缓存          | |     |
|    |    --------------------------- |     |
|    |    --------------------------- |     |
|    |    |    Opcode缓存            | |     |
|    |    --------------------------- |     |   
|    ----------------------------------     |
|    -------------    ------------------    |
|    | 数据库  |       |  Web服务器    |      |
|    -------------    ------------------    |
|    -----------------------------------    |
|    |                OS               |    |
|    -----------------------------------    |
-------------------------------------------
       PHP应用程序组件栈
注:每一个模块都有相应的性能测试工具以及辅助优化工具,可以测试并进行优化

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn