如何将参数从 bash 传递到 php 脚本?
2022-08-30 17:06:49
我做了一个运行php脚本的bash脚本。它没有参数就可以正常工作,但是当我添加参数(id和url)时,会出现一些错误:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf .d/mcrypt.ini on line 1 in Unknown on line 0
Could not open input file: /var/www/dev/dbinsert/script/automatisation.php? id=1
我从bash运行php脚本,如下所示:
php /var/www/dev/dbinsert/script/automatisation.php?id=19&url=http://bkjbezjnkelnkz.com