Home > Backend Development > PHP Tutorial > 配置LAMP中遇到的一个问题

配置LAMP中遇到的一个问题

WBOY
Release: 2016-06-06 20:50:31
Original
977 people have browsed it

apache装好了
装完php后,写一个php的echo 'hello world';
在终端下 php ****.php可以看到输出
而在浏览器下localhost/****.php没有输出
如何将php添加到apache中?
php.ini拷贝过了
apache的httpd.conf添加过这两行
AddType application/x-httpd-php .php (.前面有空格)
AddType application/x-httpd-php-source .phps (.前面有空格)
还需要做什么?

回复内容:

apache装好了
装完php后,写一个php的echo 'hello world';
在终端下 php ****.php可以看到输出
而在浏览器下localhost/****.php没有输出
如何将php添加到apache中?
php.ini拷贝过了
apache的httpd.conf添加过这两行
AddType application/x-httpd-php .php (.前面有空格)
AddType application/x-httpd-php-source .phps (.前面有空格)
还需要做什么?

你有 LoadModule 么 ..?

你的文件放到web目录下了吗?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template