0

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

4

1 回答 1

0

您是上传 1 个文件还是整个项目?您必须上传整个项目。也看看这个数据包

于 2015-10-20T04:19:48.267 回答