문제

I am uploading a .worker file to ironworker. The worker's code requires (with the require command) other php files. Do I need to upload them too to ironworker?

In other words, do I need to add something else to the .worker file and how:

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

WHERE: hello.php would contain this statement:

require_once 'bye.php';
도움이 되었습니까?

해결책

Yes. IronWorker runs on Iron.io's servers, so all dependencies need to be uploaded.

You can do this in the worker file by using the dir and file commands:

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

Dir will include entire directories, file will include only a single file. You can find out more information on the .worker reference page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top