CodeIgniter Forums
Where and how to call an external cli using the contoller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Where and how to call an external cli using the contoller (/showthread.php?tid=83786)



Where and how to call an external cli using the contoller - luckyDev - 10-11-2022

I found a third party cli that generates crystal reports, I can call it via exec (maybe even shell_exec haven't tested), my question is, where should I put the executable file (for now I've placed it inside the ThirdParty folder)? Also, I can use exec only when the script itself is in the same directory as the executable, but I want to call it inside one of my controllers to trigger the document generation upon a get request, would it be possible to use CodeIgniters cli library?