如何将 Iron.io 连接到我的UserController.php
?我正在使用app/views
.
我的代码在app/views/iron/hello_worker.php
<?php
// Worker code can be anything you want.
echo "Starting HelloWorker at ".date('r')."\n";
echo "payload:";
$payload = getPayload();
print_r($payload);
$test = new Tests;
$test->content = "iron.io testing";
$test->save();
for ($i = 1; $i <= 5; $i++) {
echo "Sleep $i\n";
sleep(1);
}
echo "HelloWorker completed at ".date('r');
?>
我已经让它工作了,但它在 Iron.io 仪表板中有错误PHP Fatal error: Class 'Tests' not found in /mnt/task/hello_worker.php on line 8