-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
24 lines (23 loc) · 839 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
$myfile=fopen("test.txt","w")or die("open fail!");
$txt=date("Y-m-d H:i:s")."start run\n";
fwrite($myfile,$txt);
require_once './system/system_init.php';
global $schedule_data;
$txt=NOW_TIME;
echo NOW_TIME;
echo"\n";
echo DB_PREFIX;
fwrite($myfile,$txt);
$GLOBALS['db']->query("start transaction");
$schedule_data=$GLOBALS['db']->getRow("select * from ".DB_PREFIX."schedule_list where exec_status in (0,1) and exec_lock =0 and schedule_time <=".NOW_TIME." order by schedule_time asc limit 1");
echo"\n";
print_r("select * from ".DB_PREFIX."schedule_list where exec_status in (0,1) and exec_lock =0 and schedule_time <=".NOW_TIME."order by schedule_time asc limit 1");
print_r($schedule_data);
print_r("\nkkk!\n");
print_r($schedule_data['id']);
//print_r($GLOBALS['db']);
fwrite($myfile,$schedule_data);
fclose($myfile);
exit();
?>