使用mac';默认的php和apache安装,其中相当于www文件夹


with mac's default php and apache installation, where is the www folder equivalent?

当我过去使用windows时,我只需安装wamp,并将php代码文件放在www文件夹中,然后导航到localhost/file_name.php即可查看该页面的运行情况。现在,随着我的新macbookair、php和apache的出现,"将php文件放入www文件夹"answers"导航到localhost/file_name.php"的等价性是什么?我该如何做我以前在Mac上做的事情?(我也不想重新安装任何东西,请不要MAMP。)

您可以在/etc/apache2/httpd.conf中查找更多设置并对其进行更改,但OSX 10.8的默认设置是/Library/WebServer/Documents。

有关如何在OSX上设置PHP以与Apache配合使用的更多信息,请访问:https://discussions.apple.com/docs/DOC-3083