Tôi đã thực hiện một tập lệnh bash chạy tập lệnh php. Nó hoạt động tốt mà không có thông số nhưng khi tôi thêm thông số (id và url), có một số lỗi:Làm thế nào để chuyển các tham số từ bash sang tập lệnh php?
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
tôi chạy php script từ bash như thế này:
php /var/www/dev/dbinsert/script/automatisation.php?id=19&url=http://bkjbezjnkelnkz.com
Yep! cảm ơn bạn Tino – user420574
Bạn sẽ chuyển một thư mục vào tập lệnh php bằng cách nào? – Michael
@Michael, cùng một cách, chỉ cần đọc nó từ mảng '$ argv'. Ngoài ra, necromancy thread là xấu. –