Re: popen() and fputs() functions work?

From: Date: Fri, 16 Mar 2001 22:46:14 +0000
Subject: Re: popen() and fputs() functions work?
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-969@lists.php.net to get a copy of this message
> Yes thanks these do work and the fiel is read and writen to, But I need to > open another running program and issue it commands while it is running in > the background. I have got been successfull at making the .exe program start > up and run properly int the background I just have not been abot the issue > it commands through fputs(). I really need to know if its at all possibel to > do so and I am really getting frustrated :-) the program open in front and > then just sits there with no commands being sent to it. Does it matter that > the other program is written in C Language or probably C++? > > Thank you very much for your help Steph. I will try and get an example up > tonihgt or tommorrow. SO you can see what I am talking about. > > Thanks again, > Josh Seward > js389599@ohiou.edu > > > > ----- Original Message ----- > From: "Steph" <Steph.Fox@btinternet.com> > To: "Josh Seward" <js389599@ohiou.edu> > Sent: Friday, March 16, 2001 5:38 AM > Subject: Fw: [PHP-GTK] popen() and fputs() functions work? > > > ps I think I know why the original might work on 'nix but not on doze. Did > M report it as a working sample, and if so, what on please???? > > ----- Original Message ----- > From: "Steph" <Steph.Fox@btinternet.com> > To: "Josh Seward" <js389599@ohiou.edu> > Sent: Friday, March 16, 2001 10:24 AM > Subject: Re: [PHP-GTK] popen() and fputs() functions work? > > > Josh - > > OK, it's morning, I'm awaker! > > Both these files work on my machine (win98) perfectly. > > There's a problem with following popen with fopen; fopen gets confused & > tries to open "$PHP_SELF" so to speak. > > If you put fclose before popen nothing works At All. I think it needs to be > two separate routines - one main, one called. > > Anyway check these on yours, the functions themselves work fine. > > Cheers anon, > Steph > > > > ----- Original Message ----- > From: "Josh Seward" <js389599@ohiou.edu> > To: "Steph" <steph.fox@btinternet.com> > Sent: Friday, March 16, 2001 3:06 AM > Subject: Re: [PHP-GTK] popen() and fputs() functions work? > > > > First you have to > > chdir('c:\\dir\\to\\file\\'); > > to the dir where josh.php is > or at least to where the file is its looking for. > > thanks, > > SLEEP!! > :-) But please reply tommorrow if you think of anything! > > > ----- Original Message ----- > From: "Steph" <Steph.Fox@btinternet.com> > To: "Josh Seward" <js389599@ohiou.edu> > Sent: Thursday, March 15, 2001 9:39 PM > Subject: Re: [PHP-GTK] popen() and fputs() functions work? > > > Ah, interesting. The second time I ran it I got an error msg and no dir \p. > > Err msg as follows: > > <br> > <b>Warning</b>: fopen("something.txt","r") - No such file or > directory in > <b>C:\php\samples\Josh.php</b> on line <b>9</b><br> > Unable to read > something.txt > C:\php\samples\Josh.php has been running > > (that last bit's my filerunner's msg) > > - why is it looking for it in the .php file????? > > ----- Original Message ----- > From: "Josh Seward" <js389599@ohiou.edu> > To: "php-gtk" <php-gtk@lists.php.net>; <php-windows@lists.php.net> > Sent: Friday, March 16, 2001 1:02 AM > Subject: [PHP-GTK] popen() and fputs() functions work? > > > Hello, > > I would like to know if anyone can get the popen() function and the fputs() > function to work on a windows machine. (I use win200.) > > thanks, > Josh Seward > js389599@ohiou.edu > > > > > > > > >

« previous php.gtk (#969) next »