Creating a PHP script to run as a cron job - using the Zend Framework library

Hi guys, I am creating a php script that will be called as a cron job. However, I need to use the functionality of the Zend framework. The fact is that relative file binding, especially in composition, does not work when programming to run through the command line, so I'm stuck on how to use zend libraries here. I do not want to enter and modify each require_once expression.

Please, help!

+3
source share
2 answers

Your PHP probably uses a different php.ini file when called through the command line interface (CLI).

php_sapi_name(), , CLI, set_include_path(), .

+2

set_include_path, Zend lib.

+2

Source: https://habr.com/ru/post/1753298/


All Articles