1
0

versioncheck.php 688 B

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