适用于 Windows 7 的 PHP 4/5 安装

发布于 2024-11-05 01:28:50 字数 922 浏览 0 评论 0原文

我有一台 Windows 7 计算机(64 位)和另一个装有 Windows Vista(32 位)的系统。 我必须查看 PHP 4 / PHP 5 代码(不确定到底是哪一个,有办法找到吗?)。 自从我安装它以来已经有很长一段时间了(使用 Apache,但我不记得在安装过程中我到底做了什么!) 我有哪些选项可以让我在我的机器上本地安装 PHP 进行编码和测试。

Windows 7 系统确实有 IIS,我不确定从 PHP 网站安装 .gz + 允许 IIS 的 CGI 类型文件是否有效?

而且我仍然不需要编译 PHP 的代码更改(因为它是解释的+在访问时运行),这仍然正确吗?

我一直在查看一些答案,例如:Windows 上的 PHP 安装 (和谷歌搜索)现在我真的很困惑!

首先,我只想安装 PHP,然后输入代码并查看代码在我的本地计算机上做什么(如果可能的话进行调试)...如果可能,请给我详细的步骤或链接。最坏的情况是,我将不得不查看在线链接,这些链接将为我而不是我的服务器进行处理。

更新: 我已经安装了 Apache Http Server 2.2(适用于 Windows),安装后,输入 localhost 指向 IIS。有没有办法在两者之间进行交换,或者我是否必须将 PHP 配置为仅与 IIS 一起使用?还尝试安装 XAMPP,但无法启动 Apache 服务(端口 80 表示它已开始使用该服务,所以我不确定发生了什么)

我还尝试为 Windows IIS 和 Apache 安装 PHP。 首先,Apache Web 服务器不会使用它的默认索引页,IIS 仍在发挥作用。 接下来,PHP 文件的行为就像从未安装过 PHP 一样,它打开代码,就好像我们正在查看代码,而不是功能(在浏览器中)一样。

I have a Windows 7 machine (64 bit) and another system with Windows Vista (32 bit).
I have to look at PHP 4 / PHP 5 code (not sure which one it is exactly, is there a way to find out?).
It's been a really long time since I installed it (used Apache but I don't remember what exactly I did during the installation!)
What are some of the options I have so I can install PHP for coding and testing purposes locally on my machine.

The Windows 7 system does have IIS and I'm not sure if installing the .gz from the PHP website + allowing CGI type files for IIS does the trick?

And I still do not have to compile code changes for PHP (since it's interpreted + run on access), is this still correct?

I've been looking at some of the answers, like this one: PHP installation on windows
(and Google searching) and now I'm really confused!

For starts, I just want to install PHP, and type in code and see what the code does (and debug if possible) on my local machine... Please give me detailed steps or links if possible. Worst case, I will have to look at links online that will do the processing for me instead of my server.

Update:
I have installed Apache Http Server 2.2 (for Windows) and after installation also, typing into localhost points to IIS. Is there any way to swap between the two or do I have to configure PHP to be used with IIS only? also tried installing XAMPP and not able to start the Apache service (Port 80 says it has started to use the service so am not sure what's going on )

I also tried installing PHP for both Windows IIS as well as for Apache.
First of all, Apache Web server doesn't go it's default index page, IIS is still in play.
Next, the PHP file behaves as if PHP was never installed, it opens the code as if we're viewing the code, not the functionality (in browser).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

ゞ记忆︶ㄣ 2024-11-12 01:28:50

就像 cwallenpoole 提到的那样,使用 XAMPP 或 WAMP,这两种方法都是在 Windows 计算机上安装 apache/php 等的简单方法。

安装 XAMPP 后,您可以将文件保存到 C:/xampp/htdocs(或您选择安装 xampp 的任何位置),然后可以通过访问 http://localhost/ 在浏览器中

Like cwallenpoole mentioned, use XAMPP or WAMP, both being easy methods to install apache/php .etc on a windows machine.

After installing XAMPP, you can save your files to C:/xampp/htdocs (or wherever you chose to install xampp), they can then be viewed/ran by visiting http://localhost/ in your browser

瑾夏年华 2024-11-12 01:28:50

下载并安装 Wamp 或 XAMPP。它们都是标准的Win。安装(无需您自己进行任何编译)。他们将为您创建一个本地 Apache 实例,因此您无需担心 IIS。将代码复制到 www 文件夹(对于 wamp)或 htdocs 文件夹中。 (如果是 PHP 4 代码,大多数情况下它仍应在 PHP 5 中运行。)导航到 localhost/您将看到代码运行时会发生什么。

是的,除非特殊情况,PHP 不需要编译。

Download and install Wamp or XAMPP. They are both standard Win. installs (no need for any compiling on your own). They will create a local Apache instance for you so you won't need to worry about IIS. Copy the code into the www folder (for wamp) or htdocs folder. (If it is PHP 4 code, for the most part it should still run in PHP 5.) Navigate to localhost/<code subfolder> and you'll see what happens when the code runs.

And yes, PHP does not need to be compiled except in extraordinary circumstances.

墨落成白 2024-11-12 01:28:50

You could install PHP on windows using the Microsoft Platform Installer http://www.microsoft.com/web/platform/phponwindows.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文