PHP Debug总结


1.log信息输出
  file_put_contents()
  eg.file_put_contents("/opt/123.txt", $finalPath ."+++". $imagePath, FILE_APPEND);
  out_put_json()
  echo()
  print_r()
 
  nginx log /opt/nginx/logs/error.log

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应用程序组件栈
注:每一个模块都有相应的性能测试工具以及辅助优化工具,可以测试并进行优化

猜你喜欢

转载自369213201-qq-com.iteye.com/blog/1825215
今日推荐