Reply to Re: popen on Windows

Your name:

Reply:


Posted by Daniel Klein on 12/23/07 14:43

On Mon, 24 Dec 2007 00:06:32 +1000, "Vince Morgan"
<vinharAtHereoptusnet.com.au> wrote:

>According to the manual the file pointer that is returned by "popen()" can
>be used by the following, fgets(), fgetss(), and fwrite() whereas you are
>calling "fread()".
>
>> It works when I run this from a command prompt:
>>
>> C:\Inetpub\wwwroot\php>php popentest.php
>> popen test...
>> Hello World!
>That is because hw.exe is outputting to the consol when it runs I would
>think
>http://www.php.net/popen


Good catch. I changed the code to:

$fp = popen("cmd /c c:\\home\\cp\\hw.exe", "r+w");
$myline = fgets($fp);
pclose($fp);
echo $myline;

which envokes the program via 'cmd', but it still does not work in a
web browser :-(

I have already Google'd this to death and cannot find anything that
helps.

Daniel Klein

[Back to original 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

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