install.php 641 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
  3. header("Content-Type:text/html; charset=utf-8");
  4. define('BIND_MODULE', 'Install');
  5. define ('APP_DEBUG', true);
  6. define ('APP_PATH', './Modules/');
  7. define ('RUNTIME_PATH', './Runtime/');
  8. if(!is_dir(RUNTIME_PATH)) {
  9. if(!mkdir(RUNTIME_PATH, 0777)){
  10. header('Content-Type:text/html; charset=utf-8');
  11. exit('目录 [ '.RUNTIME_PATH.' ] 不存在!');
  12. }
  13. }
  14. if(!is_writeable(RUNTIME_PATH)) {
  15. header('Content-Type:text/html; charset=utf-8');
  16. exit('目录 [ '.RUNTIME_PATH.' ] 不可写!');
  17. }
  18. require './ThinkPHP/ThinkPHP.php';