search

PHP 开发者实践

PHP Developer Prepares

坚持了 5 年的创业项目决定结束了(行业垂直搜索方向,理想很美好、现实很骨感),作为没混好的草根站长 & 没被风吹起来的小互联网公司技术合伙人,个人基本见证了这几年 PHP 环境的发展(当然主要归功于互联网创业风潮大爆发),感受了一些 PHP 团队和从业者的现状;同时,我们自身在 PHP 研发团队组建过程中也遇到了不少问题,一直想把创业过程中遇到的这些团队实践相关问题整理、总结一下,目前只是个初始版本,欢迎大家拍砖 & 加入!

技术的发展日新月异,我会持续维护、跟进这个项目,欢迎各位有兴趣的朋友 提交建议、问题 - Issue或 参与贡献、分享 - Pull Request。

  • 本项目排版遵循 文案排版指北和 Stack Overflow Markdown规范
  • 本项目使用了 GitBook 并已发布在 GitBook.com上,关于如何使用 Gitbook 编写、生成、发布一本在线图书,请移步 GitBook Documentation或 Gitbook 使用入门 - 中文

    • GitBook.com 是一个很优秀的社区,上面有很多优秀作者自出版自己的著作,就好像 Leanpub
    • Gitbook 是 GitBook.com 提供的一个开源的基于 Node.js 开发的配套工具 - Github 地址
  • 开发过程中遇到的绝大多数问题实际上都可以通过搜索引擎找到,关于搜索引擎使用技巧,请参考 如何用好 Google 等搜索引擎?
  • 开发过程中遇到问题在论坛、社区中提问是很常见的情况,如何让他人快速理解你的问题、同时自己如何在提问中学习成长,推荐阅读: How To Ask Questions The Smart Way, 提问的智慧 - 中文版或提问的智慧 - 图片版

    「《提问的智慧》就是一个敲门砖,它把黑客间的礼仪和准则明白地写下来。它会让你了解到一个事实,为什么那些看起来很牛的人几乎从不提问,似乎他们一进入这个行业就是牛人了。不是的,他们也有问题,但是通常在提问之前就自己解决了;不是因为他们本来就懂得怎么解决,而是解决问题的经历让他们成为牛人;最终,你只会看到网络上多了一篇文章:关于解决XXX问题的方案。」-- Rei

  • 因为关于如何使用 PHP 语言本身相关资料已有很多,本文将尽量不涉及 PHP 语言本身、且优先引用已有资料,主要围绕关心 PHP 项目开发技巧和具体实践,通过相关工具和经验的分享,使大家在项目中更好的使用 PHP 技术。

在线阅读

重要说明:正在持续修改之中,大部分章节都没有写完,正式发布还需要一段时间,所有内容随时可能发生变动。

  • http://ryancao.gitbooks.io/php-developer-prepares/content/

如何参与

本项目在 Github 上维护,欢迎参与: https://github.com/zacao/php-developer-prepares。

  • 在 GitHub 上把本项目 fork到自己的仓库,如 /php-developer-prepares,然后 clone到本地,并设置用户信息。
    $ git clone git@github.com:<your-username>/php-developer-prepares.git$ cd php-developer-prepares$ git config user.name "yourname"$ git config user.email "your email"
  • 修改代码后提交,并推送到自己的仓库。
    $ #do some change on the content$ git commit -am "Fix issue #1: change helo to hello"$ git push
  • 在 GitHub 网站上提交 pull request。
  • 定期使用项目仓库内容更新自己仓库内容。
    $ git remote add upstream https://github.com/zacao/php-developer-prepares$ git fetch upstream$ git checkout master$ git rebase upstream/master$ git push -f origin master

授权许可

本文采用创意共享 「署名-非商业性使用」许可证(Creative Commons Attribution-NonCommercial license)。所有内容不仅可以免费阅读,还可以自由使用(比如转载),只需遵守两个条件:

  • 署名:必须保留原作者的署名。

  • 非商业性使用:除非得到正式许可,否则不得用于商业目的。

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
Explain how load balancing affects session management and how to address it.Explain how load balancing affects session management and how to address it.Apr 29, 2025 am 12:42 AM

Load balancing affects session management, but can be resolved with session replication, session stickiness, and centralized session storage. 1. Session Replication Copy session data between servers. 2. Session stickiness directs user requests to the same server. 3. Centralized session storage uses independent servers such as Redis to store session data to ensure data sharing.

Explain the concept of session locking.Explain the concept of session locking.Apr 29, 2025 am 12:39 AM

Sessionlockingisatechniqueusedtoensureauser'ssessionremainsexclusivetooneuseratatime.Itiscrucialforpreventingdatacorruptionandsecuritybreachesinmulti-userapplications.Sessionlockingisimplementedusingserver-sidelockingmechanisms,suchasReentrantLockinJ

Are there any alternatives to PHP sessions?Are there any alternatives to PHP sessions?Apr 29, 2025 am 12:36 AM

Alternatives to PHP sessions include Cookies, Token-based Authentication, Database-based Sessions, and Redis/Memcached. 1.Cookies manage sessions by storing data on the client, which is simple but low in security. 2.Token-based Authentication uses tokens to verify users, which is highly secure but requires additional logic. 3.Database-basedSessions stores data in the database, which has good scalability but may affect performance. 4. Redis/Memcached uses distributed cache to improve performance and scalability, but requires additional matching

Define the term 'session hijacking' in the context of PHP.Define the term 'session hijacking' in the context of PHP.Apr 29, 2025 am 12:33 AM

Sessionhijacking refers to an attacker impersonating a user by obtaining the user's sessionID. Prevention methods include: 1) encrypting communication using HTTPS; 2) verifying the source of the sessionID; 3) using a secure sessionID generation algorithm; 4) regularly updating the sessionID.

What is the full form of PHP?What is the full form of PHP?Apr 28, 2025 pm 04:58 PM

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.

How does PHP handle form data?How does PHP handle form data?Apr 28, 2025 pm 04:57 PM

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

What is the difference between PHP and ASP.NET?What is the difference between PHP and ASP.NET?Apr 28, 2025 pm 04:56 PM

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,

Is PHP a case-sensitive language?Is PHP a case-sensitive language?Apr 28, 2025 pm 04:55 PM

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.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

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 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool