Programmatically exiting Firefox with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pizzipie
Forum Commoner
Posts: 87
Joined: Wed Feb 10, 2010 10:59 pm
Location: Hayden. ID

Programmatically exiting Firefox with PHP

Post by pizzipie »

I would like to exit the Firefox browser at the finish of my PHP script. Using exit() all it will
do is go to the index.html in the browser. I would like to end up at the regular Ubuntu opening
window.

Could someone show me code to do this. I have set Firefox to allow exit:
"dom.allow_scripts_to_close_windows" .

Thanks in advance,

RP
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Programmatically exiting Firefox with PHP

Post by markusn00b »

PHP doesn't run in the browser. Use JavaScript instead.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Programmatically exiting Firefox with PHP

Post by Jonah Bron »

PHP can't do that. At the end of your PHP, insert some Javascript to close the window.

http://www.google.com/search?q=javascript+close+window
Post Reply