1

我正在向 Ironworker 上传一个 .worker 文件。worker 的代码需要(使用 require 命令)其他 php 文件。我也需要将它们上传到 Ironworker 吗?

换句话说,我是否需要在 .worker 文件中添加其他内容以及如何:

# define the runtime language
runtime "php"
# exec is the file that will be executed:
exec "hello.php"

WHERE:hello.php 将包含以下语句:

require_once 'bye.php';
4

1 回答 1

4

是的。IronWorker 在 Iron.io 的服务器上运行,因此需要上传所有依赖项。

您可以使用dirandfile命令在工作文件中执行此操作:

dir 'path/to/dir'
file 'path/to/file.php'

Dir 将包含整个目录,file 将仅包含单个文件。您可以在.worker 参考页面上找到更多信息。

于 2013-01-05T13:28:59.570 回答