You are here: Re: popen on Windows « PHP Programming Language « IT news, forums, messages
Re: popen on Windows

Posted by Vince Morgan on 12/23/07 14:44

"Daniel Klein" <danielk@featherbrain.net> wrote in message
news:u89qm352ob3hep0heags7bd82q3seqcdjb@4ax.com...
> 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:
>
I could be wrong, but "printf()" is going to want to output to a consul, and
I can't see how you are going to capture the output via "popen()" which is
expecting a file pointer. You need to capture the output as a string so
that it can be output to the server as HTML or whatever. However you cannot
return a string from a C executable.
HTH
Vince

 

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

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