Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

index.php 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /* @var $this YiiRequirementChecker */
  3. /* @var $summary array */
  4. /* @var $requirements array[] */
  5. ?><!DOCTYPE html>
  6. <html lang="en">
  7. <head>
  8. <meta charset="utf-8"/>
  9. <title>Yii Application Requirement Checker</title>
  10. <?php $this->renderViewFile(dirname(__FILE__) . '/css.php'); ?>
  11. </head>
  12. <body>
  13. <div class="container">
  14. <header>
  15. <h1>Yii Application Requirement Checker</h1>
  16. </header>
  17. <hr>
  18. <main>
  19. <h3>Description</h3>
  20. <p>
  21. This script checks if your server configuration meets the requirements
  22. for running Yii application.
  23. It checks if the server is running the right version of PHP,
  24. if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
  25. </p>
  26. <p>
  27. There are two kinds of requirements being checked. Mandatory requirements are those that have to be met
  28. to allow Yii to work as expected. There are also some optional requirements being checked which will
  29. show you a warning when they do not meet. You can use Yii framework without them but some specific
  30. functionality may be not available in this case.
  31. </p>
  32. <h3>Conclusion</h3>
  33. <?php if ($summary['errors'] > 0): ?>
  34. <div class="alert alert-danger">
  35. <strong>Unfortunately your server configuration does not satisfy the requirements by this application.<br>Please refer to the table below for detailed explanation.</strong>
  36. </div>
  37. <?php elseif ($summary['warnings'] > 0): ?>
  38. <div class="alert alert-info">
  39. <strong>Your server configuration satisfies the minimum requirements by this application.<br>Please pay attention to the warnings listed below and check if your application will use the corresponding features.</strong>
  40. </div>
  41. <?php else: ?>
  42. <div class="alert alert-success">
  43. <strong>Congratulations! Your server configuration satisfies all requirements.</strong>
  44. </div>
  45. <?php endif; ?>
  46. <h3>Details</h3>
  47. <table class="table table-bordered">
  48. <tr><th>Name</th><th>Result</th><th>Required By</th><th>Memo</th></tr>
  49. <?php foreach ($requirements as $requirement): ?>
  50. <tr class="<?php echo $requirement['condition'] ? 'success' : ($requirement['mandatory'] ? 'danger' : 'warning') ?>">
  51. <td>
  52. <?php echo $requirement['name'] ?>
  53. </td>
  54. <td>
  55. <span class="result"><?php echo $requirement['condition'] ? 'Passed' : ($requirement['mandatory'] ? 'Failed' : 'Warning') ?></span>
  56. </td>
  57. <td>
  58. <?php echo $requirement['by'] ?>
  59. </td>
  60. <td>
  61. <?php echo $requirement['memo'] ?>
  62. </td>
  63. </tr>
  64. <?php endforeach; ?>
  65. </table>
  66. </main>
  67. <hr>
  68. <footer>
  69. <p>Server: <?php echo $this->getServerInfo() . ' ' . $this->getNowDate() ?></p>
  70. <p>Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></p>
  71. </footer>
  72. </div>
  73. </body>
  74. </html>