index.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. /* @var $this YiiRequirementChecker */
  8. /* @var $summary array */
  9. /* @var $requirements array[] */
  10. echo "\nYii Application Requirement Checker\n\n";
  11. echo "This script checks if your server configuration meets the requirements\n";
  12. echo "for running Yii application.\n";
  13. echo "It checks if the server is running the right version of PHP,\n";
  14. echo "if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.\n";
  15. $header = 'Check conclusion:';
  16. echo "\n{$header}\n";
  17. echo str_pad('', strlen($header), '-') . "\n\n";
  18. foreach ($requirements as $key => $requirement) {
  19. if ($requirement['condition']) {
  20. echo $requirement['name'] . ": OK\n";
  21. echo "\n";
  22. } else {
  23. echo $requirement['name'] . ': ' . ($requirement['mandatory'] ? 'FAILED!!!' : 'WARNING!!!') . "\n";
  24. echo 'Required by: ' . strip_tags($requirement['by']) . "\n";
  25. $memo = strip_tags($requirement['memo']);
  26. if (!empty($memo)) {
  27. echo 'Memo: ' . strip_tags($requirement['memo']) . "\n";
  28. }
  29. echo "\n";
  30. }
  31. }
  32. $summaryString = 'Errors: ' . $summary['errors'] . ' Warnings: ' . $summary['warnings'] . ' Total checks: ' . $summary['total'];
  33. echo str_pad('', strlen($summaryString), '-') . "\n";
  34. echo $summaryString;
  35. echo "\n\n";