技术支持

Support

Server for PHP
支持 macOS 12 及以上版本(Apple Silicon)· 内置 PHP 8.5.x(PHP License v3.01)
Compatible with macOS 12 and later (Apple Silicon) · Bundled with PHP 8.5.x (PHP License v3.01)

感谢您使用 Server for PHP。本页面提供功能说明、常见问题解答以及联系方式。

功能介绍

常见问题

如何启动 PHP 服务?
点击菜单栏中的应用图标,选择 Start 即可启动 PHP 内置服务器。
端口被占用了怎么办?
应用会自动检测端口占用情况。如果默认端口 8000 被占用,会先尝试 8000,如果仍被占用则从 8001 开始顺延到下一个可用端口。
如何访问 PHP 服务?
服务运行时,在浏览器中打开 http://127.0.0.1:端口 即可访问;也可点击菜单中的 Port: XXXXX 复制该地址。
Local Access Only 是什么?默认状态?
默认关闭,服务监听 0.0.0.0,允许局域网内其他设备访问。开启后仅接受本机(127.0.0.1)的连接。
如何设置网页根目录(Web Root)?
点击 Select Web Root…,在文件夹选择器中选择你的 PHP 项目目录。选择后若服务正在运行会自动重启生效;若未运行则下次启动时生效。路径通过安全书签持久化,重启应用后无需重新选择。
Open Web Root 为什么是灰色的?
说明尚未设置网页根目录。请先通过 Select Web Root… 选择一个文件夹,之后 Open Web Root 即可在 Finder 中打开该目录。
切换设置时服务未运行会怎样?
切换 Local Access Only 或选择 Web Root 时,若服务未运行,不会自动启动服务,设置会在下一次服务启动时生效;若服务正在运行,则会自动重启以立即应用新设置。
如何查看日志?
点击菜单中的 Working Directory 打开工作目录,其中包含:logs/(日志)、php.ini(配置文件)、php.pid(进程 PID)。
如何卸载?
将应用拖入废纸篓即可。如需删除所有数据,请手动删除 ~/Library/Application Support/ServerForPHP/ 目录。

联系我们

如遇问题或有建议,欢迎通过邮箱联系
我们会在 1-7 个工作日内回复。反馈时请尽量提供操作系统版本、应用版本与问题复现步骤。

开源许可证

本应用包含 PHP 8.5.x,依据 PHP License v3.01 授权。详见 php.net/license/3_01.txt。

本应用非 PHP 官方产品,仅为 PHP 内置服务器的第三方管理工具。

Thank you for using Server for PHP. This page covers features, common questions, and how to reach us.

Features

FAQ

How do I start the PHP server?
Click the app icon in the menu bar and choose Start to launch PHP's built-in server.
What if the port is taken?
The app auto-detects port usage. If 8000 is occupied, it tries 8000 first; if still taken, it falls back to 8001 and continues upward.
How do I access the PHP server?
While the service is running, open http://127.0.0.1:port in your browser. You can also click Port: XXXXX in the menu to copy the URL.
What does Local Access Only do, and what's the default?
It's enabled by default — only connections from localhost (127.0.0.1) are accepted. Disable it to allow LAN access.
How do I set the Web Root?
Click Select Web Root… and pick your PHP project folder. If the service is running, it restarts automatically; if not, the new root takes effect on the next start. The path is persisted via a Security-Scoped Bookmark, so you won't need to reselect it after restarting the app.
Why is Open Web Root grayed out?
It means no web root has been set yet. Use Select Web Root… to choose a folder first, then Open Web Root will open it in Finder.
What happens if I change settings while the service is not running?
Toggling Local Access Only or selecting a Web Root while the service is stopped will not start the service; the setting takes effect on the next start. If the service is running, it restarts automatically to apply the new setting immediately.
How do I view logs?
Click Working Directory in the menu. It contains: logs/ (logs), php.ini (config), and php.pid (process PID).
How do I uninstall?
Drag the app to the Trash. To remove all data, manually delete ~/Library/Application Support/ServerForPHP/.

Contact

For issues or suggestions, reach us at
We reply within 1-7 business days. Please include your OS version, app version, and steps to reproduce.

Open Source License

This app bundles PHP 8.5.x, licensed under the PHP License v3.01. See php.net/license/3_01.txt.

This is not an official PHP product; it is a third-party management tool for PHP's built-in server.