I have a script in php and I want it to run every minute for example, and in the crontab I have it like this:
cd /var/www/html/RestApi/ /usr/bin/php /var/www/html/RestApi/prueba.php
The thing is that if I execute it without being in the RestApi
directory, the include
I have in my php fails with this error:
PHP Warning: include_once (./ vendor / autoload.php): failed to open stream: No such file or directory in /var/www/html/RestApi/test.php on line 5 PHP Warning: include_once (): Failed opening './vendor/autoload.php' for inclusion (include_path = '.: / usr / share / php') in /var/www/html/RestApi/test.php on line 5 PHP Fatal error: Uncaught Error: Class 'Illuminate \ Support \ Collection' not found in /var/www/html/RestApi/test.php:12 Stack trace: {main} thrown in /var/www/html/RestApi/test.php on line 12
can you help me?