Linux command
phpquery 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo phpquery -V
Example
sudo phpquery -v [7.4] -S
Example
sudo phpquery -v [7.4] -s [cli] -M
Check
sudo phpquery -v [7.4] -s [apache2] -m [json]
说明
phpquery queries PHP configuration on Debian-based systems. It reports installed PHP versions, available SAPIs (Server API), and enabled extensions. This is useful for scripts and automation that need to detect PHP configuration. The tool reads configuration from /etc/php/ directory structure and reports the state of symbolic links that control module activation.
参数
- -v _version_
- PHP version to query
- -s _sapi_
- SAPI to query
- -V
- List available PHP versions
- -S
- List available SAPIs
- -M
- List enabled modules
- -m _module_
- Check if specific module is enabled
- -q
- Quiet mode, exit status only
FAQ
What is the phpquery command used for?
phpquery queries PHP configuration on Debian-based systems. It reports installed PHP versions, available SAPIs (Server API), and enabled extensions. This is useful for scripts and automation that need to detect PHP configuration. The tool reads configuration from /etc/php/ directory structure and reports the state of symbolic links that control module activation.
How do I run a basic phpquery example?
Run `sudo phpquery -V` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -v _version_ do in phpquery?
PHP version to query