搜索
首页后端开发php教程PHP4.1.0出版公告中英对照版1_PHP教程

PHP 4.1.0 Release Announcement PHP 4.1.0 出版公告(1) After a lengthy QA process, PHP 4.1.0 is finally out. Download at http://www.php.net/downloads.php ! PHP 4.1.0 includes several other key improvements: - A new input interface for improved security (read below) 一个新的输入界面来提高安全性 - Highly improved performance in general 极大提高了性能 - Revolutionary performance and stability improvements under Windows. The multithreaded server modules under Windows (ISAPI, Apache, etc.) perform as much as 30 times faster under load! We want to thank Brett Brewer and his team in Microsoft for working with us to improve PHP for Windows. Windows 下革命性的性能和稳定性。多线程服务器模块提供了快30倍的性能。 - Versioning support for extensions. Right now its barely being used, but the infrastructure was put in place to support separate version numbers for different extensions. The negative side effect is that loading extensions that were built against old versions of PHP will now result in a crash, instead of in a nice clear message. Make sure you only use extensions built with PHP 4.1.0. 扩展翻译支持,现在他还很少用到,但是放置了基础构造来支持某些不同版本号的扩展模块。负面影响是他和老版本的扩展模块冲突。你需要确定使用了 php4.1.0的扩展模块。 - Turn-key output compression support 支持 Turn-key 输出压缩 - *LOTS* of fixes and new functions 修正了很多地方,增加了许多函数。 As some of you may notice, this version is quite historical, as its the first time in history we actually incremented the middle digit! :) The two key reasons for this unprecedented change were the new input interface, and the broken binary compatibility of modules due to the versioning support. {没看懂!!呵呵!以后看懂了再翻译} Following is a description of the new input mechanism. For a full list of changes in PHP 4.1.0, scroll down to the end of this section. 下面是新的输入机制的描述。完整的更改列表请看后面 ----------------------------------- SECURITY: NEW INPUT MECHANISM 安全:新的输入机制 First and foremost, its important to stress that regardless of anything you may read in the following lines, PHP 4.1.0 *supports* the old input mechanisms from older versions. Old applications should go on working fine without modification! 首先,也是最重要的,必须强调对下面内容足够重视是非常重要的。php 4.1.0 支持旧的输入机制。老的应用程序仍然可以运行,不用修改。 Now that we have that behind us, lets move on :) 下面是内容 For various reasons, PHP setups which rely on register_globals being on (i.e., on form, server and environment variables becoming a part of the global namespace, automatically) are very often exploitable to various degrees. For example, the piece of code: 由于各种原因,PHP需要设置 register_globlas ON(例如在标单,服务器,环境变量自动成为全局命名空间的一部分),他们经常被不同程度的干扰。下面是一段代码: May be exploitable, as remote users can simply pass on authenticated as a form variable, and then even if authenticate_user() returns false, $authenticated will actually be set to true. While this looks like a simple example, in reality, quite a few PHP applications ended up being exploitable by things related to this misfeature. 可以通过表单里面传送 authenticated 变量来欺骗,即使 authenticate_user()返回false,$authenticated 仍然被设置为true.这只是一个非常简单的例子,实际上,相当多的程序被类似的错误特性欺骗 While it is quite possible to write secure code in PHP, we felt that the fact that PHP makes it too easy to write insecure code was bad, and weve decided to attempt a far-reaching change, and deprecate register_globals. Obviously, because the vast majority of the PHP code in the world relies on the existence of this feature, we have no plans to actually remove it from PHP anytime in the foreseeable future, but weve decided to encourage people to shut it off whenever possible. 当然,完全可以书写安全的PHP代码,我们觉得事实上,PHP使得书写不安全代码变得非常容易是非常糟糕的事情。我们决定尝试一个 far-reaching 改变。反对 register_globals.很显然,由于多数代码依赖于这个特征,我们没有办法在将来的某个时刻真正删除它。但是我们决定鼓励人们关闭它 To help users build PHP applications with register_globals being off, weve added several new special variables that can be used instead of the old global variables. There are 7 new special arrays: 为了在关闭 register_globals 情况下帮助用户创建 PHP 应用程序,我们增加了一些新的特殊变量来代替老的全局变量使用。他们是7个新的特殊数组: $_GET - contains form variables sent through GET 包含着通过GET发来的变量 $_POST - contains form variables sent through POST 包含着通过POST发送来的变量 $_COOKIE - contains HTTP cookie variables 包含着HTTP cookie 的变量 $_SERVER - contains server variables (e.g., REMOTE_ADDR) 包含着服务器变量(如 REMOTE_ADDR) $_ENV - contains the environment variables 包含着环境变量 $_REQUEST - a merge of the GET variables, POST variables and Cookie variables. In other words - all the information that is coming from the user, and that from a security point of view, cannot be trusted. 是 GET/POST/Cookie 变量的集合,也就是说,所有的来自用户和安全表单的信息。但是从安全角度来看,不能够信任它们。 $_SESSION - contains HTTP variables registered by the session module 包含着所有session模块注册的HTTP变量 Now, other than the fact that these variables contain this special information, theyre also special in another way - theyre automatically global in any scope. This means that you can access them anywhere, without having to global them first. For example: 现在,事实上这些变量包含着特殊的信息,他们在任何环境下同样是自动的全局变量。也就是说你可以在任何地方存取他们,不需要全局化他们。例如: function example1() { print $_GET["name"]; // works, global $_GET; is not necessary! //不需要声明 $_GET 是全局变量 } would work fine! We hope that this fact would ease the pain in migrating old code to new code a bit, and were confident its going to make writing new code easier. Another neat trick is that creating new entries in the $_SESSION array will automatically register them as session variables, as if you called session_register(). This trick is limited to the session module only - for example, setting new entries in $_ENV will *not* perform an implicit putenv(). 运行的很好。我们希望这个情况可以使得旧代码移植能够容易一些,我们确信它能使书写新代码更容易。另外一个窍门是创建新的 $_SESSION 数组入口会自动注册他们为session b变量,就好像调用 session_register()一样。这个窍门仅适用于 session 模块。例如,设置新的 $_ENV 入口不会隐含执行 putenv()。 PHP 4.1.0 still defaults to have register_globals set to on. Its a transitional version, and we encourage application authors, especially public ones which are used by a wide audience, to change their applications to work in an environment where register_globals is set to off. Of course, they should take advantage of the new features supplied in PHP 4.1.0 that make this transition much easier. PHP 4.1.0 默认还是设置 register_globals 为On,她是过渡版本,我们程序做着,特别是被广泛接受的,改变他们的应用程序,使得在 register_globals 为 off 情况下也能工作。当然,他们需要使用 PHP 4.1.0 的新特征来使得转换更容易些。 As of the next semi-major version of PHP, new installations of PHP will default to having register_globals set to off. No worries! Existing installations, which already have a php.ini file that has register_globals set to on, will not be affected. Only when you install PHP on a brand new machine (typically, if youre a brand new user), will this affect you, and then too - you can turn it on if you choose to. 在下一个不完全版本力,将会魔人设置 register_globals 为off.不用担心,已经安装好的,php.ini 里面已经设置 register_globals 为on 的,不会受到影响。只有在你安装php为一个新机器时(一般是一个新用户)才会影响你,你可以选择打开它。 Note: Some of these arrays had old names, e.g. $HTTP_GET_VARS. These names still work, but we encourage users to switch to the new shorter, and auto-global versions. 注意:这些数组中的几个有老的名字,例如 $HTTP_G

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/532219.htmlTechArticlePHP 4.1.0 Release Announcement PHP 4.1.0 出版公告(1) After a lengthy QA process, PHP 4.1.0 is finally out. Download at http://www.php.net/downloads.php ! PHP 4.1.0 includes sev...
声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php怎么实现几秒后执行一个函数php怎么实现几秒后执行一个函数Apr 24, 2022 pm 01:12 PM

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

最新可用的win7旗舰版密钥2021版最新可用的win7旗舰版密钥2021版Jul 08, 2023 pm 02:37 PM

激活win7旗舰版系统的方法主要是通过win7激活码或者win7激活工具,一般正版的win7激活码是需要花钱的,那么在哪里有免费可用的win7旗舰版密钥呢?今天小编就给大家分享些最新可用的win7旗舰版密钥用于激活系统。一、win7旗舰版激活密钥神key:FJGCP-4DFJD-GJY49-VJBQ7-HYRR2VQ3PY-VRX6D-CBG4J-8C6R2-TCVBD2Y4WT-DHTBF-Q6MMK-KYK6X-VKM6G342DG-6YJR8-X92GV-V7DCV-P4K279CW99-

php怎么除以100保留两位小数php怎么除以100保留两位小数Apr 22, 2022 pm 06:23 PM

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

php怎么根据年月日判断是一年的第几天php怎么根据年月日判断是一年的第几天Apr 22, 2022 pm 05:02 PM

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php怎么替换nbsp空格符php怎么替换nbsp空格符Apr 24, 2022 pm 02:55 PM

方法:1、用“str_replace(" ","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\&nbsp\;||\xc2\xa0)/","其他字符",$str)”语句。

php怎么判断有没有小数点php怎么判断有没有小数点Apr 20, 2022 pm 08:12 PM

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

php字符串有没有下标php字符串有没有下标Apr 24, 2022 am 11:49 AM

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
2 周前By尊渡假赌尊渡假赌尊渡假赌
仓库:如何复兴队友
4 周前By尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
4 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

功能强大的PHP集成开发环境