You are here: Re: How do I quote this in php? « All PHP « IT news, forums, messages
Re: How do I quote this in php?

Posted by Dave (from the UK) on 05/23/06 03:14

Owen Rees wrote:
> On Tue, 23 May 2006 00:22:05 +0100, "Dave (from the UK)"
> <see-my-signature@southminster-branch-line.org.uk> wrote in
> <4472479f@212.67.96.135>:
>
>
>>Normally in batch mode the output from Mathematica is all on one line,
>>but sometimes there are multiple lines. But the browser window only
>>shows the one line. The stdout.txt file that I create shows multiple
>>lines, so why don't the others appear in the browser window?
>
>
> See e.g. <http://uk2.php.net/fgets> - fgets reads a line and you only
> call it once. That page has an example of reading up to end of file.


Thanks, I spotted that after I posted. I decided to change for an fread
though, not multiple fgets in a loop.

$handle = popen("echo $fullcmd | tee stdin.txt | $mathprog | tee
stdout.txt | $tailprog", "r");
$data=fread($handle,1000000);
pclose($handle);


That seems to work OK now.


--
Dave K MCSE.

MCSE = Minefield Consultant and Solitaire Expert.

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация