faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

36 of 55 people (65%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I call a command line executable from within PHP?

Jun 8th, 2008 21:30
dman, ha mo, Kerim Cilingiroglu, Heini van Bergen, Philip Olson, Chris Kings-Lynne, Darren David, http://www.ttnr.org


Check out the "Program Execution functions" here :
    http://www.php.net/manual/en/ref.exec.php
As well as the `backtick` execution operator :
    http://www.php.net/manual/en/language.operators.execution.php
Consider exec() :
    exec — Execute an external program                :
    ---------------------------------------------------
    http://www.php.net/manual/en/function.exec.php
Be aware of conflicts with user rights..
----
I dont suggest you to do that within php. because it has security
concerns. but if 
you are desperate then use shell_exec
---