304
edits
m (→PHP) |
|||
| Line 25: | Line 25: | ||
* Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php | * Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php | ||
* Usage of superglobals | * Usage of PHP superglobals 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 work also if option '''register_long_arrays''' is set to off. | 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 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). | 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). | ||
| Line 41: | Line 41: | ||
that is slower. | that is slower. | ||
* String must be rounded by simple quote and variable inside string must be out of the quote. | * String must be rounded by simple quote and variable inside string must be out side of the quote. | ||
<source lang="php"> | <source lang="php"> | ||
print 'My text show my '.$variable.' !'; | print 'My text show my'.$variable.'!'; | ||
</source> | </source> | ||
edits