execute a linux script from PHP

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon Jan 13, 2003 4:49 am

Try change at this:

Code: Select all

///////////////////////////////////////////////////////////
 if (!function_exists('imp_expand_fromaddress')) {
    function imp_expand_fromaddress ($imp) {
           $cmd = '/usr/local/bin/myscript ' . "'" . escapeShellCmd($imp['user']) . "'";
           $res=exec("$cmd");
           return ($res);
   }
}

or see how to do this smart peaple iwho read manual carefully:
http://www.php.net/manual/en/function.e ... ellarg.php
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Post Reply