2014-06-08 72 views
1

我已經檢查register_argc_argv是否在我的php.ini文件中,它使用的是PHP-CLIPHP 5.4 undefined index:argv

這是錯誤消息我得到:

PHP Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57\nStack trace:\n#0 phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///var/www...', 57, Array)\n#1 phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(111): Symfony\Component\Console\Input\ArgvInput->__construct()\n#2 phar:///var/www/html/composer.phar/src/Composer/Console/Application.php(83): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput))\n#3 phar:///var/www/html/composer.phar/bin/composer(43): Composer\Console\Application->run()\n#4 /var/www/html/composer.phar(15): require('phar:///var/www...')\n#5 /var/www/html/db.php(13): require_once('/var/www/html/c...')\n#6 {main}\n thrown in phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php on line 57

回答

-2

這是什麼導致錯誤:

foreach (scandir(dirname(__FILE__)) as $filename) { 
    $path = dirname(__FILE__) . '/' . $filename; 
    if (is_file($path)) { 
     require_once $path; 
    } 
+1

這並沒有真正解釋錯誤了!或許這對你來說是有道理的,但它對別人沒有幫助。 – duskwuff