【问题标题】:Git HTML 5 demo on OSXOSX 上的 Git HTML 5 演示
【发布时间】:2011-08-20 15:04:45
【问题描述】:

我是 Web 开发的新手,想在我的 Mac 上运行一个 Github 项目 (https://github.com/remy/html5demos)。

我已经在我的 Mac 上下载了该项目,但不知道如何运行它。需要 Stackoverflow 上所有有才华的人的帮助。

【问题讨论】:

  • 要在您的 MAC 上打开(和运行)PHP 文件,您需要一个带有 PHP 服务器的 Apache。 OSX Leopard(和更新版本)默认有这个。在本教程中,您可以了解如何运行它。 editrocket.com/articles/php_apache_mac.html

标签: php macos html


【解决方案1】:

使用 php 的演示。不幸的是,安装在 OSX 上的 apache(假设您使用的是 Snow Leopard)默认没有启用 php,您需要进行一些管理员编辑才能启用它。

因此,首先将解压后的文件夹 remy_something 移动到 /Library/WebServer/Documents 并将其重命名为简单名称,例如“remy”。 (最终路径/Library/WebServer/Documents/remy)

在系统偏好设置中启用网络共享

将浏览器指向http://localhost/remy/index.php

if you get an rendered page - you're done, and can start playing...
if you get an error - something is terrible ;(
if you get a page where is the 1st line <?php - you're on good way - you need enable php.

要在 OSX 的 apache 中启用 php,您应该阅读例如:http://www.perfectline.ee/blog/how-to-setup-apache-and-php-on-mac-os-x-snow-leopard 或您可以找到的任何其他指南。

启用php并重新启动apache(禁用/启用Web共享)后,您可以再次查看页面...

【讨论】:

  • 谢谢丰富!这真的很有帮助。我有雪豹和 index.php 能够呈现。但我遇到的第二个问题是没有找到 url。点击 index.php 上的任何链接后,它说找不到 UR。可能资源丢失了。但我已经下载并解压缩了整个文件夹,它应该可以工作。
猜你喜欢
  • 2011-02-06
  • 2014-05-28
  • 2019-04-20
  • 2014-09-10
  • 2013-09-30
  • 2014-07-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多