Skip to Content
PHP编程:第4版
book

PHP编程:第4版

by Kevin Tatroe, Peter MacIntyre
January 2021
Intermediate to advanced
505 pages
9h 45m
Chinese
Publishing House of Electronics Industry
Content preview from PHP编程:第4版
355
17
调试
PHP
调试是一项后天技能。开发者常说:你得到了想要的绳子,打个蝴蝶结比绑住自己的手好。
按自然常理来说,调试越多就越精通。当然,当代码没达到预期效果时,你会从服务器
环境得到一些不错的提示。在深入调试的概念之前,我们需要看一下蓝图并讨论一下这
些程序环境。每个开发工作室都有自己的配置和做事的方式,所以我们在这里涵盖的是
在理想环境中的,也被称作最佳实践。
在理想情况下,
PHP
开发至少有三种工作环境,它们是开发环境、预演环境和生产环境,
我们可以在下面的内容中探索每一种环境。
开发环境
开发环境是一个创建原始代码的地方,不用担心服务器崩溃和同伴嘲笑。这是一个概念
和理论被证明或证伪的地方 ;代码可以实验性地被创建。因此,在这里,错误报告反馈
必须尽可能多。所有的错误报告都需要被记录并且同时被发送到输出设备(浏览器)。所
有的警告必须尽量敏感和具有描述性。
本章后面的表
17-1
展示了每种环境推荐的进行调试和错误报告的服务器配置。
开发环境的配置是有争议的。不过,如果你的公司有资源,那么就可以用一台独立的服
务器来建立一个完整的代码管理(
SVN
Subversion
Git
)的地方。如果没有资源,
开发用的电脑可以通过本地的配置来达到这个目的。
localhost
环境有利于开发者尝试
完全不同寻常的东西,
在独立的
PC
上写代码可以完全是实验性的,不用担心影响通用
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley
算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
Java持续交付

Java持续交付

Daniel Bryant, Abraham Marín-Pérez

Publisher Resources

ISBN: 9787121404634