versioncheck.php 615 B

1234567891011121314151617
  1. <?php
  2. // Show warning if a PHP version below 7.1 is used,
  3. if (version_compare(PHP_VERSION, '7.1') === -1) {
  4. http_response_code(500);
  5. echo 'This version of Nextcloud requires at least PHP 7.1<br/>';
  6. echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
  7. exit(-1);
  8. }
  9. // Show warning if > PHP 7.3 is used as Nextcloud is not compatible with > PHP 7.3 for now
  10. if (version_compare(PHP_VERSION, '7.4.0') !== -1) {
  11. http_response_code(500);
  12. echo 'This version of Nextcloud is not compatible with > PHP 7.3.<br/>';
  13. echo 'You are currently running ' . PHP_VERSION . '.';
  14. exit(-1);
  15. }