439
edits
| Line 53: | Line 53: | ||
</source> | </source> | ||
* the inclusion of classes dedicated to the module is done from the folder containing the php page; | * the inclusion of classes dedicated to the module is done from the folder containing the php page (module to module); | ||
''Example :'' | ''Example :'' | ||
<source lang="php"> | <source lang="php"> | ||
| Line 67: | Line 67: | ||
Note: NEVER use a relative path like this: require '../class/myclass.php'; - your include won't work depending on where resides the executed script! Also, your module won't work with both the old main root specification and the new /custom/ specification. | Note: NEVER use a relative path like this: require '../class/myclass.php'; - your include won't work depending on where resides the executed script! Also, your module won't work with both the old main root specification and the new /custom/ specification. | ||
* The inclusion of a class dedicated to the module, without knowing from where the file will be called, is done using a function Dolibarr; | * The inclusion of a class dedicated to the module, without knowing from where the file will be called, is done using a function Dolibarr (core to module or module to module); | ||
''Example :'' | ''Example :'' | ||
<source lang="php"> | <source lang="php"> | ||
| Line 73: | Line 73: | ||
</source> | </source> | ||
* The inclusion of classes from dolibarr use the following syntax; | * The inclusion of classes from dolibarr use the following syntax (module to core or core to core); | ||
''Example :'' | ''Example :'' | ||
<source lang="php"> | <source lang="php"> | ||
edits