FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Runs In WinXP Command Window But Not In Browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Runs In WinXP Command Window But Not In Browser [message #173378 is a reply to message #173374] Tue, 05 April 2011 23:27 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Tue, 05 Apr 2011 18:36:08 +0000, Jim Higgins wrote:

> Denis, the above is good stuff - THANK YOU - but how does one configure
> so that simply clicking on that phpinfo.php file results in the same
> action as connecting to
> http://localhost/phpinfo.php

You can't.

Well, possibly you can, but it's more complex than I can set up quickly.
You'd need to code something that would generate an appropriate url and
pass it to your web browser, and to generate the url you'd need to know
where under your document root the file was, so you would have to:

1) find the actual file system path to the file
2) compare to the file system path for docroot
3) if the leftmost part of the filesystem path matches the docroot path,
remove it
3a) convert from windows to url format paths if appropriate
4) add the http://localhost/ in place of the removed part
5) call the web browser with the url

eg if the file is:

c:\documents and settings\jim higgins\testing\htdocs\test1\phpinfo.php

and the apache docroot is:

c:\documents and settings\jim higgins\testing\htdocs

then you need to invoke a browser with the url:

http://localhost/test1/phpinfo.php

It's probably possibly on a linux box with a bit of scripting, I have no
idea how to do it on a windows box, but personally, I want php files on
the server to open in my text editor when I double click them.

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: neither var_dump() nor die() displays anything
Next Topic: Spaces in filenames
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 21:41:40 GMT 2024

Total time taken to generate the page: 0.05429 seconds