note 36197 added to function.exec

From: Date: Tue, 30 Sep 2003 15:07:27 +0000
Subject: note 36197 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-57500@lists.php.net to get a copy of this message
Has anybody an idea how to run this script via PHP: #!/bin/sh echo $2 | smbclient -M $1 This should send an Windowsmessage to an user $1 with the text $2. My problem is, that only the first word of the text is send. So $2 must lock something like "text" I tried this versions: 1. exec(" /usr/scripts/ndtowin $user $text2 "); 2. exec(" /usr/scripts/ndtowin $user \"$text2\" "); 3. $f = escapeshellcmd($text); system("/usr/scripts/ndtowin $user \"$f\""); 4. exec("/usr/scripts/ndtowin $user" . " " . escapeshellarg($text)); but nothing works. Anyone an Idea? DC ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36197 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36197&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36197&report=yes

« previous php.notes (#57500) next »