ironWorker没有插入我的数据库

时间:2015-10-20 03:09:35

标签: database laravel-4 php-5.6 iron.io ironworker

如何将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

中出错

1 个答案:

答案 0 :(得分:0)

您上传1个文件还是整个项目?您必须上传整个项目。 另请查看this packet