Re: Run Executive from PHP on Windows

From: Date: Wed, 11 Aug 2004 07:37:55 +0000
Subject: Re: Run Executive from PHP on Windows
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4958@lists.php.net to get a copy of this message
difenza2003@libero.it wrote:
Hi all i try to develop a little Gui Application to create html document. I want to launch the browser with exec() function from PHP-Gtk but i don't have any result. $button = &new GTkButton('view'); $button->connect('clicked','launch_browser'); function launch_browser() { $path = "C:\\Program\\Internet Explorer\\iexplore.exe"; exec($path); } On the CMD.exe console i read unkown command C:\Program\Internet Explorer\iexplore.exe blah blah blah I want to locate the browser on localhost to particular site from example: http://localhost/example/view.php What i do ? hi here's my windows specific version of your launch_browser, it'll work
on win 98,2000,XP function win_browser($url){ if(substr_count(strtoupper(PHP_OS),'NT')) $com = 'start /B IEXPLORE.EXE "'.$url.'"'; else $com = '"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "'.$url.'"'; $com = popen($com,'w'); pclose($com); } hope that'll help, best regards, nathan

« previous php.gtk.general (#4958) next »