304
edits
m (→PHP) |
|||
| Line 26: | Line 26: | ||
* Usage of superglobals PHP variables must use dedicated operators $_COOKIES, $_SERVER, $_ENV but use Dolibarr function GETPOST() to get content of $_GET or $_POST.. | * Usage of superglobals PHP variables must use dedicated operators $_COOKIES, $_SERVER, $_ENV but use Dolibarr function GETPOST() to get content of $_GET or $_POST.. | ||
Other operators ($HTTP_SERVER_GET, ...) are now deprecated inside PHP, so they must no more be used. Like that code will | Other operators ($HTTP_SERVER_GET, ...) are now deprecated inside PHP, so they must no more be used. Like that code will work also if option '''register_long_arrays''' is set to off. | ||
Moreover, the code must | Moreover, the code must work when PHP option '''register_globals''' is off (recommended by PHP). It must work the same way when the option '''register_globals''' is on (by default on a lot of installations). | ||
* Do not use '''PHP_SELF'''. Use instead $_SERVER["PHP_SELF"]. | * Do not use '''PHP_SELF'''. Use instead $_SERVER["PHP_SELF"]. | ||
edits