Wamp Server未执行php代码 [英] Wamp Server isn't executing php code

查看:100
本文介绍了Wamp Server未执行php代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用

http://localhost:8080/sample.html

我要运行的代码是:

<?php phpinfo(); ?>

我也尝试了以下方法:

  • 几次重启所有服务,包括使Wamp Server联机
  • 将httpd.conf中的侦听端口更改为8080,并将Skype配置为接受80和443端口

可能是某些Firefox扩展阻止了php执行吗?

Could it be that some firefox extensions are blocking php-execution?

我得到的就是与我写的完全一样的php代码.

All I get is the php code exactly like I wrote it.

推荐答案

没有扩展会干扰php的执行,因为它是在服务器端而不是在客户端执行的.

No extensions can interfere with execution of php because it is executed at the server end, not the client end.

由于文件扩展名为html并且WAMP服务器不处理.html文件,因此未执行php代码.

The php code is not executed because your file's extension is html and the WAMP server does not process .html files.

将扩展名更改为sample. php ,然后它将起作用

Change the extension to sample.php and then it will work

这篇关于Wamp Server未执行php代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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