PHP access CodeIgniter class from file executed by CLI -
i have ci_model class called xray. have controller class called pages handles pages within application. 1 of these pages called worker.php. execute worker.php using supervisord cli.
i want able access xray's functions worker.php, not through command line (i won't using command line after worker.php executed).
load xray either model or library, whichever more appropriate, , access normally
class pages extends ci_controller { function worker() { $this->load->library('xray'); echo $this->xray->my_func(); } } php codeigniter class command-line-interface
No comments:
Post a Comment