从学习PHP基础知识到使用ZendSudio工具开发有半年多了,这过程中,学习断断续续,遇到的问题也是N多,学习PHP还真是不让人省心。最不省心的还是算调试过程。
学习编程,一定要懂得调试,否则就如同盲人摸象,理不清这里面的运行机制。也许是因为自己非科班出来,或是领悟力不足,又或本身xdebug工具本身设置较为复杂,导致我对Zendstudio的调试过程充满了步步惊心。
我使用的是XAMPP的集成开发平台环境。里面已经预设了Xdebug的调试工具,只需要自己改下配置的就可以了。
我的开发模式是,在虚拟机上搭建XAMPP环境,然后IDE环境在本机上。这就出现了远程调试的问题。不过Xdebug人家本来就提供了这种方案,而且挺强大。
开始处于心急,没有充分理解Xdebug工具的使用和配置信息。急急赶鸭子上架,可是没几天就出问题了,已开始的session停在57%,后来是断点不生效,一下子就运行过去了。
通过对9000端口观察,原来是客户端会启动9000端口来监听和接收服务器端的调试信息,这就意味着,从服务器可以telnet 9000 到客户端,但是客户端是无法连接服务器9000端口的。
最终解决方案:从新搭建一遍xampp环境,重新配置下,再启用调试信息就一切正常了。

The article discusses PHP, detailing its full form, main uses in web development, comparison with Python and Java, and its ease of learning for beginners.

PHP handles form data using $\_POST and $\_GET superglobals, with security ensured through validation, sanitization, and secure database interactions.

The article compares PHP and ASP.NET, focusing on their suitability for large-scale web applications, performance differences, and security features. Both are viable for large projects, but PHP is open-source and platform-independent, while ASP.NET,

PHP's case sensitivity varies: functions are insensitive, while variables and classes are sensitive. Best practices include consistent naming and using case-insensitive functions for comparisons.

The article discusses various methods for page redirection in PHP, focusing on the header() function and addressing common issues like "headers already sent" errors.

Article discusses type hinting in PHP, a feature for specifying expected data types in functions. Main issue is improving code quality and readability through type enforcement.

The article discusses PHP Data Objects (PDO), an extension for database access in PHP. It highlights PDO's role in enhancing security through prepared statements and its benefits over MySQLi, including database abstraction and better error handling.

Article discusses creating and securing PHP APIs, detailing steps from endpoint definition to performance optimization using frameworks like Laravel and best security practices.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 English version
Recommended: Win version, supports code prompts!
