Solution to an incompatible problem between PHP4 and PHP3
Source: Internet
Author: User
A solution to the incompatibility problem between PHP4 and PHP3. read a solution to the incompatibility problem between PHP4 and PHP3. PHP4 is incompatible with PHP3, but this is mainly PHP in PHP4. there are some differences in settings in ini. these changes mainly increase the efficiency of PHP4. In the changes, track_vars is usually used to make the old PHP3 program "> <LINKhr PHP4 is incompatible with PHP3, but this is mainly the PHP. ini in PHP4.
There are some differences in the settings. these changes mainly improve the efficiency of PHP4.
In the changes, the track_vars settings usually make the old PHP3 program unavailable.
Run again, because the track_vars value is set to off in the PHP4 extension settings.
In this way, the GET, POST, and COOKIE cannot be directly transmitted from the previous page in the old PHP3 program.
.
I have a simple solution here. you don't need to set track_vars to on,
However, this is only an appropriate method. in the future, we will use $ HTTP_GET_VARS,
$ HTTP_POST_VARS and $ HTTP_COOKIE_VARS read these variables better.
The following is a simple program. you can add GET, POST, COOKIE
You can directly reference these variables.
Get. variable. inc. php
If (isset ($ HTTP_POST_VARS ))
{
While (list ($ key, $ val) = each ($ HTTP_POST_VARS ))
{
$ Key = $ val;
}
}
If (isset ($ HTTP_GET_VARS ))
{
While (list ($ key, $ val) = each ($ HTTP_GET_VARS ))
{
$ Key = $ val;
}
}
If (isset ($ HTTP_COOKIE_VARS ))
{
While (list ($ key, $ val) = each ($ HTTP_COOKIE_VARS ))
{
$ Key = $ val;
}
}
?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.