File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
* <fg=blue>Run</> your application:
6
6
1. Change to the project directory
7
7
2. Create your code repository with the <comment>git init</comment> command
8
- 3. Execute the <comment>php -S 127.0.0.1:8000 -t public</> command
8
+ 3. Execute the <comment>php -S 127.0.0.1:8000 -t public public/index.php </> command
9
9
4. Browse to the <comment>http://localhost:8000/</> URL.
10
10
11
11
Quit the server with CTRL-C.
Original file line number Diff line number Diff line change 19
19
$ debug = (bool ) ($ _SERVER ['APP_DEBUG ' ] ?? $ _ENV ['APP_DEBUG ' ] ?? ('prod ' !== $ env ));
20
20
21
21
if ($ debug ) {
22
+ // Compatibility with the built-in PHP web server
23
+ if ('/index.php ' !== $ _SERVER ['SCRIPT_NAME ' ] && is_file (__DIR__ .$ _SERVER ['SCRIPT_NAME ' ])) {
24
+ return false ;
25
+ }
22
26
umask (0000 );
23
27
24
28
Debug::enable ();
Original file line number Diff line number Diff line change 5
5
* <fg=blue>Run</> your application:
6
6
1. Change to the project directory
7
7
2. Create your code repository with the <comment>git init</comment> command
8
- 3. Execute the <comment>php -S 127.0.0.1:8000 -t public</> command
8
+ 3. Execute the <comment>php -S 127.0.0.1:8000 -t public public/index.php </> command
9
9
4. Browse to the <comment>http://localhost:8000/</> URL.
10
10
11
11
Quit the server with CTRL-C.
Original file line number Diff line number Diff line change 19
19
$ debug = (bool ) ($ _SERVER ['APP_DEBUG ' ] ?? $ _ENV ['APP_DEBUG ' ] ?? ('prod ' !== $ env ));
20
20
21
21
if ($ debug ) {
22
+ // Compatibility with the built-in PHP web server
23
+ if ('/index.php ' !== $ _SERVER ['SCRIPT_NAME ' ] && is_file (__DIR__ .$ _SERVER ['SCRIPT_NAME ' ])) {
24
+ return false ;
25
+ }
22
26
umask (0000 );
23
27
24
28
Debug::enable ();
You can’t perform that action at this time.
0 commit comments