检查 PHP 是否安装在 Apache 或 IIS 服务器上? [英] Check if PHP is installed on Apache or IIS Server?

查看:25
本文介绍了检查 PHP 是否安装在 Apache 或 IIS 服务器上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 PHP 环境中检查 PHP 是否安装在 Apache 或 IIS 服务器上?

Is there a way to check if PHP is installed on an Apache or IIS server within the PHP environment itself?

如果是,怎么做?

推荐答案

在可访问的路径上创建一个包含以下内容的文件(比如 info.php)并尝试浏览它:

create a file (say info.php) with the following content on an accessible path and try to browse it:

<?php
phpinfo();
?>

@Alfabravo 说的对:用完后别忘了把文件从服务器上删除!

@Alfabravo is correct: don't forget to delete the file from the server after using it!

这篇关于检查 PHP 是否安装在 Apache 或 IIS 服务器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆