D
D
Dmitry2015-07-06 14:01:41
PHP
Dmitry, 2015-07-06 14:01:41

Pass parameters to php via console (ssh)?

Hello!
There is a class.php script, you need to pass parameters to it, via the console, cron. I can't figure out what to do in this situation.
I tried this:
/usr/bin/php /var/www/site/data/www/folder.ru/folder/class.php host=2
Still not transferred, is it possible at all?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Burov, 2015-07-06
@muldy

php.net/manual/en/reserved.variables.argv.php

X
Xaser, 2015-07-06
@Xaser

$argv

D
Dmitry Entelis, 2015-07-06
@DmitriyEntelis

php.net/manual/en/reserved.variables.argv.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question