超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<从 PHP/FI 2 移植到 PHP 3Migrating from PHP 4 to PHP 5>
Last updated: Fri, 22 Jun 2007

章 54. 从 PHP 3 移植到 PHP 4

PHP 已经有一段很长的历史:传奇的 PHP 1.0,PHP/FI,PHP 3.0 和 PHP 4.0。

1. 从 PHP 3 移植到 PHP 4
2. Session 是否可以工作在 PHP 3 下?
3. 不兼容的函数问题?

1. 从 PHP 3 移植到 PHP 4

PHP 4 被尽可能的设计为与早期的 PHP 版本兼容。在 PHP 4 的设计开发过程中,只有非常少的早期 PHP 版本具有的功能被 PHP 4 删除。如果你不敢确定你的 PHP 文件 的兼容性,你可以安装一个 PHP 4 测试环境来测试你的 PHP 文件。

相关信息请查看附录中的相应章节

2. Session 是否可以工作在 PHP 3 下?

尽管“本地会话支持”在 PHP 3 中并不存在,但是有第三方的应用程序能够提供会话功能。最通常的方法是使用 PHPLIB

3. 不兼容的函数问题?

由于 PHP 4 基本上只是重写了整个 PHP 引擎,因此只改变了很少的几个函数而且只是外来函数中的几个。




add a note add a note User Contributed Notes
从 PHP 3 移植到 PHP 4
van dot enckevort at hccnet dot nl
03-Sep-2001 05:22
[Ed Note:
You may also modify the AddType directives in httpd.conf rather than edit mime.types, which will accomplish the same thing:

AddType application/x-httpd-php .php .phtml .php3

--irc-html@php.net]
To use .php3 files with PHP4 in (at least) Apache edit your mime.types and comment out the php3 mime types and add php3 to the line reading:

application/x-httpd-php     phtml pht php

So it will read:

application/x-httpd-php     phtml pht php php3

Restart Apache to be sure it picks up the new settings.

<从 PHP/FI 2 移植到 PHP 3Migrating from PHP 4 to PHP 5>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22