Re: Weird problem while reading in a file to an Array
| From: | Shawn McKenzie | Date: | Fri, 30 Jan 2009 00:33:37 +0000 |
| Subject: | Re: Weird problem while reading in a file to an Array | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287387@lists.php.net to get a copy of this message | ||
Michelle Konzack wrote:
> Hello Shawn,
>
> Am 2009-01-29 15:34:41, schrieb Shawn McKenzie:
>> exec(escapeshellcmd("echo '$BUILDLOG' | head -n 11"), $TMP_DATA);
>>
>> There are quotes or backticks or something in $BUILDLOG.
>
> Thanks for it, now I have an array but the "|head -n 11" is ignored and
> my arrays have up to several 10.000 elements...
>
> Also if I like to continue processing,it does not more work because the
> backslashes...
$BUILDLOG = escapeshellcmd($BUILDLOG);
exec("echo \"$BUILDLOG\" | head -n 11"), $TMP_DATA);
--
Thanks!
-Shawn
http://www.spidean.com