Файловый менеджер - Редактировать - /usr/local/bin/php
Назад
#!/usr/bin/php <?php // Sneaky sneaky, only clever thinking ahead - you should come work for us $handlerMapping = [ 'application/x-httpd-php' => '/usr/bin/php85', 'application/x-httpd-php-latest' => '/usr/bin/php85', 'application/x-httpd-php56' => '/usr/bin/php56', 'application/x-httpd-php70' => '/usr/bin/php70', 'application/x-httpd-php71' => '/usr/bin/php71', 'application/x-httpd-php72' => '/usr/bin/php72', 'application/x-httpd-php73' => '/usr/bin/php73', 'application/x-httpd-php74' => '/usr/bin/php74', 'application/x-httpd-php80' => '/usr/bin/php80', 'application/x-httpd-php81' => '/usr/bin/php81', 'application/x-httpd-php82' => '/usr/bin/php82', 'application/x-httpd-php83' => '/usr/bin/php83', 'application/x-httpd-php84' => '/usr/bin/php84', 'application/x-httpd-php85' => '/usr/bin/php85', ]; $argv = array_slice($GLOBALS['argv'], 1); $home = getenv('HOME') ?: getenv('PWD'); $phpbin = null; $dotPhpVersion = null; $_searchDir = $home; while ($_searchDir && $_searchDir !== '/') { $_path = $_searchDir . '/.phpversion'; if ( file_exists($_path) ) { $dotPhpVersion = $_path; break; } $_searchDir = dirname($_searchDir); } $htaccessLocations = []; if (isset($argv[0]) && is_file($argv[0])) { $htaccessLocations[] = dirname($argv[0]) . '/.htaccess'; } if ( getcwd() !== $home ) { $htaccessLocations[] = getcwd() . '/.htaccess'; } # $htaccessLocations[] = $home . '/public_html/.htaccess'; foreach ($htaccessLocations as $_htaccess) { if (!is_file($_htaccess)) { continue; } $_htaccessData = file_get_contents($_htaccess); if (preg_match('/^(?!\s*#)\s*AddType\s+(\S+)\s+\.php\b/im', $_htaccessData, $matches)) { $handler = $matches[1]; if (isset($handlerMapping[$handler])) { $phpbin = $handlerMapping[$handler]; break; } } } if (!$phpbin && $dotPhpVersion !== null && is_file($dotPhpVersion)) { $_dotPhpVersion = file_get_contents($dotPhpVersion); if (isset($handlerMapping[$_dotPhpVersion])) { $phpbin = $handlerMapping[$_dotPhpVersion]; } } if (!$phpbin) { $phpbin = $handlerMapping['application/x-httpd-php']; } $envvars = []; foreach ($_SERVER as $_k => $_v) { if (is_scalar($_v)) { $envvars[$_k] = (string)$_v; } } pcntl_exec($phpbin, $argv, $envvars);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка