如何在Mac v 10.7.2上安装/使用php [英] How to install/use php on mac v 10.7.2
问题描述
我是您对使用PHP感兴趣的普通大学生.谁能给我101有关如何使用简单的普通语言在Mac版本10.7.2上安装/启用它的信息?我将不胜感激!
i'm your average college student interested in using PHP. Could anyone give me a 101 on how to install/enable it on a mac version 10.7.2 using simple, plain language? I will appreciate any and all help!!
欢呼声
推荐答案
无需安装PHP或Apache,它们已随Mac 10.7一起提供
这些是PHP和Apache协同工作所需的基本步骤:
No Need to Install PHP or Apache, They already ship with Mac 10.7
These are the basic steps you need to take for PHP and Apache to work together:
- 在您的httpd.conf文件中启用PHP-/etc/apache2/httpd.conf
- 设置您的php.ini-sudo cp/etc/php.ini.default/etc/php.ini
- 启用位于共享">中的Apache Web服务器.网络共享
在您的httpd.conf文件中找到此设置
Find this setting in your httpd.conf file
#LoadModule php5_module libexec/apache2/libphp5.so
然后,取消注释
LoadModule php5_module libexec/apache2/libphp5.so
本指南介绍了在Mac上设置MySQL和VirtualHost的方法.我已经使用此设置六个多月了.另外,在10.7早期版本上的工作也很好. http://superfancy.net/coding/php-mysql- apache-in-mac-osx-leopard/
This guide explains setting up MySQL and VirtualHost on Mac. I have been using this setup for over six months. Also, worked on the 10.7 early releases just fine. http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/
启动Apache
sudo apachectl start
重新启动Apache
Restart Apache
sudo apachectl restart
(已编辑以删除重新启动命令中的错字)
(edited to remove typo in restart command)
这篇关于如何在Mac v 10.7.2上安装/使用php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!