Re: using passthru or system() even and passing the $_FILES array
| From: | tamouse mailing lists | Date: | Wed, 28 Sep 2011 21:50:42 +0000 |
| Subject: | Re: using passthru or system() even and passing the $_FILES array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315050@lists.php.net to get a copy of this message | ||
On Wed, Sep 28, 2011 at 10:52 AM, Jim Lucas <lists@cmsws.com> wrote:
> On 9/28/2011 12:07 AM, Anton Heuschen wrote:
>> $command = '/usr/bin/php -f /var/www/details/Write.php '.$email.'
>> '.$actionDate.' '.$files.' >> php.log';
>> system($command,$return);
>
> At this point I would suggest that you echo $command before trying to execute it.
>
> I think you might find that you are trying to pass characters that the cli are
> miss interpreting.
OP: Look at http://us2.php.net/manual/en/function.escapeshellarg.php
and http://us2.php.net/manual/en/function.escapeshellcmd.php