Bonjour,
J'ai un souci pour définir mon environnement de travail.
Voici mon fichier application.ini :
Si je fait un :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 [production] ; PHP settings we want to initialize phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 ; Make sure the following is on the include_path includePaths.library = APPLICATION_PATH "/../library" ; Indicate the path and classname of the bootstrap bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" ; Bootstrap resources: ; - Front Controller ; - Layout resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" resources.view[] = ; initialize database resources.db.adapter = "MYSQLI" resources.db.params.host = "localhost" resources.db.params.username = "monvrainom" resources.db.params.password = "myrealpass" resources.db.params.dbname = "cms" resources.db.params.date_format = "YYYY-MM-ddTHH:mm:ss" resources.db.isDefaultTableAdapter = true [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 ; initialize database resources.db.adapter = "MYSQLI" resources.db.params.host = "localhost" resources.db.params.username = "root" resources.db.params.password = "" resources.db.params.dbname = "cms"
J'ai toujours le même résultat que si je fais un :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development')); var_dump($this->getOptions());
A savoir le résultat suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); var_dump($this->getOptions());
Comment cela se fait il ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 array 'phpsettings' => array 'display_startup_errors' => string '1' (length=1) 'display_errors' => string '1' (length=1) 'includepaths' => array 'library' => string 'C:\wamp\www\CMS\application/../library' (length=38) 'bootstrap' => array 'path' => string 'C:\wamp\www\CMS\application/Bootstrap.php' (length=41) 'class' => string 'Bootstrap' (length=9) 'resources' => array 'frontController' => array 'controllerDirectory' => string 'C:\wamp\www\CMS\application/controllers' (length=39) 'layout' => array 'layoutPath' => string 'C:\wamp\www\CMS\application/layouts/scripts' (length=43) 'view' => array 0 => string '' (length=0) 'db' => array 'adapter' => string 'MYSQLI' (length=6) 'params' => array ... 'isDefaultTableAdapter' => string '1' (length=1)
Je devrais avoir display_startup_errors à 1 pour production, et display_startup_errors à 0 pour development.
Quelqu'un pourrait il m'aider à comprendre la définition de l'environnement ?
Je pige pas, je suis dessus depuis 4 heures et quelque chose m'échappe.
Merci.








Répondre avec citation
Partager