File tree Expand file tree Collapse file tree 2 files changed +27
-11
lines changed
Expand file tree Collapse file tree 2 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env php
22<?php
33
4- $ autoloadPath = dirname (__DIR__ ) . "/autoload.php " ;
5- if (!file_exists ($ autoloadPath )) {
6- $ autoloadPath =dirname (__DIR__ ) . "/vendor/autoload.php " ;
4+ $ autoloaders = [
5+ __DIR__ . '/../../../autoload.php ' ,
6+ __DIR__ . '/../vendor/autoload.php ' ,
7+ __DIR__ . '/vendor/autoload.php ' ,
8+ __DIR__ . '/../autoload.php '
9+ ];
10+
11+ foreach ($ autoloaders as $ autoloader ) {
12+ if (file_exists ($ autoloader )) {
13+ define ("AUTOLOAD_PATH " , $ autoloader );
14+ break ;
15+ }
716}
8- require ($ autoloadPath );
17+
18+ require (AUTOLOAD_PATH );
919
1020set_time_limit (0 );
1121ini_set ('memory_limit ' , '2048M ' );
Original file line number Diff line number Diff line change @@ -5,15 +5,21 @@ use React\Http\Response;
55use React \Http \Request ;
66use Application \HTTP \App ;
77
8- $ autoloadPath = dirname (__DIR__ ) . "/autoload.php " ;
9- $ configPath = dirname (__DIR__ ) . "/mkusher/padawan/app/config/bin.php " ;
10- if (!file_exists ($ autoloadPath )) {
11- $ autoloadPath = dirname (__DIR__ ) . "/vendor/autoload.php " ;
12- $ configPath = dirname (__DIR__ ) . "/app/config/bin.php " ;
8+ $ autoloaders = [
9+ __DIR__ . '/../../../autoload.php ' ,
10+ __DIR__ . '/../vendor/autoload.php ' ,
11+ __DIR__ . '/vendor/autoload.php ' ,
12+ __DIR__ . '/../autoload.php '
13+ ];
14+
15+ foreach ($ autoloaders as $ autoloader ) {
16+ if (file_exists ($ autoloader )) {
17+ define ("AUTOLOAD_PATH " , $ autoloader );
18+ break ;
19+ }
1320}
1421
15- require ($ configPath );
16- require ($ autoloadPath );
22+ require (AUTOLOAD_PATH );
1723
1824$ noFsIO = false ;
1925$ port = 15155 ;
You can’t perform that action at this time.
0 commit comments