Configuration file: Difference between revisions

Jump to navigation Jump to search
Line 49: Line 49:
Your code must never open the config file and read it directly. This is not necessarly.
Your code must never open the config file and read it directly. This is not necessarly.


* $dolibarr_main_document_root is known in code in constant: DOL_DOCUMENT_ROOT (that indicate physical path of directory where permanent or temporary files are stored).
* $dolibarr_main_data_root is known in code in constant: DOL_DATA_ROOT (that indicate physical path of directory with data files uploaded or created by Dolibarr).
* $dolibarr_main_document_root is known in code in constant: DOL_DOCUMENT_ROOT (that indicate physical path of Dolibarr directory programs).
* $dolibarr_main_url_root is known in code in constant: DOL_URL_ROOT (that indicate relative URL that is Dolibarr root).
* $dolibarr_main_url_root is known in code in constant: DOL_URL_ROOT (that indicate relative URL that is Dolibarr root).
* $dolibarr_main_db_type is known in code on variable $conf->db->type
* $dolibarr_main_db_type is known in code on variable $conf->db->type
Line 56: Line 57:
* $dolibarr_main_db_name is known in code on variable $conf->db->name
* $dolibarr_main_db_name is known in code on variable $conf->db->name
* $dolibarr_main_db_user is known in code on variable $conf->db->login
* $dolibarr_main_db_user is known in code on variable $conf->db->login
* $dolibarr_main_db_pass is not known by code. It is read by script '''master.inc.php''' that created on object connexion '''$db''' then variable $dolibarr_main_db_pass is erased.
* $dolibarr_main_db_pass is not known by code. It is read by script '''master.inc.php''' that created a connexion object '''$db''' then variable $dolibarr_main_db_pass is erased.


See tutorial on page [[Module development|Module development]] or [[Script development]] for more information.
See tutorial on page [[Module development|Module development]] or [[Script development]] for more information.

Navigation menu