在Mac Snow Leopard上启用PHP [英] Enable php on mac snow leopard
问题描述
已安装:
Entropy PHP 5.3.03.pkg
我一直在尝试在Mac上启用php.但是每次我将浏览器指向test.php时,我得到的只是显示的源代码:
I have been trying to enable php on my mac. But everytime I point the browser to my test.php all I get is the source code being displayed:
我将test.php放在以下位置:
I put my test.php in the following location:
user/admin/sites
然后我使用以下网址浏览到其中:
And I browse to in using the following url:
http://localhost/~admin/test.php
我所看到的就是这个:
<?php phpinfo(); ?>
我已经执行以下操作:
cp /etc/php.ini.default /etc/php.ini
chmod 666 /etc/php.ini
我已在system preferences | web sharing
我也没有注释/etc/apache2/httpd.conf
#LoadModule php5_module libexec/apache2/libphp5.so
我已经重新启动apache
I have restarted apache
apachectl restart
但是,我总是最终会显示源代码.
However, I always end up with the source code being displayed.
非常感谢您的任何建议,
Many thanks for any suggestions,
推荐答案
我无法直接回答您的特定问题,但是如果您仍然遇到问题,我是否可以建议简单的替代方法?安装 MAMP .几乎不需要任何设置,就可以像魅力一样工作.此处的网站: http://www.mamp.info/en/index.html
I can't answer your particular problem directly, but if you continue to have issues, may I suggest easy alternative? Install MAMP. Works like a charm with very little setup. Website here: http://www.mamp.info/en/index.html
这篇关于在Mac Snow Leopard上启用PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!