Reply to Re: popen on Windows

Your name:

Reply:


Posted by Jerry Stuckle on 12/28/07 02:43

Daniel Klein wrote:
> I'm trying to get popen to work on Windows.
>
> Here's a simplified example of what I'm trying to get working:
>
> I have a hw.c program as follows:
>
> #include <stdio.h>
> main()
> {
> printf ("Hello World!\n");
> }
>
> And here's the 'popentest.php' code:
>
> popen test...
> <?php
> $fp = popen('C:\\home\\bin\\hw.exe', 'r');
> $data = fread($fp, 1024);
> pclose($fp);
> echo $data;
> ?>
>
> It works when I run this from a command prompt:
>
> C:\Inetpub\wwwroot\php>php popentest.php
> popen test...
> Hello World!
>
> All I get in a web browser is:
>
> popen test...
>
> What am I missing?
>
> Thanks
> Daniel Klein
>

Daniel,

On question - does the web server user have permission to execute the
file? Have you verified this?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[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

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