Browse Source

Update school_bells_cron.php (#181)

Remove root.php reference
frytimo 11 tháng trước cách đây
mục cha
commit
364fa185d8
1 tập tin đã thay đổi với 1 bổ sung4 xóa
  1. 1 4
      school_bells/school_bells_cron.php

+ 1 - 4
school_bells/school_bells_cron.php

@@ -2,11 +2,8 @@
 
 //restrict to command line only
 	if(defined('STDIN')) {
-		$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
-		preg_match("/^(.*)\/app\/.*$/", $document_root, $matches);
-		$document_root = $matches[1];
+		$document_root = dirname(__DIR__, 2);
 		set_include_path($document_root);
-		include "root.php";
 		require_once "resources/require.php";
 		require_once "resources/classes/text.php";
 		$_SERVER["DOCUMENT_ROOT"] = $document_root;