We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to exec() a library file (a class) in command?



85.5k

can you be a little bit more specific ?

You want to initialise a class in a specific file using

exec();

?



27.0k

like this? exec('php /app/plugins/chat.php',$output, $return_val);print_r($output);exit(); but tip: Compute\AppController handler class cannot be loaded thank you for you help , I want to add you as my friend,how QQ?FB?or Email

Don't. Just don't. exec() should pretty much never be used, and certainly not to run and entire file. The security implications are huge.