faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

39 of 54 people (72%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Can a local PHP page be parsed using a remote installation of PHP?

Mar 15th, 2008 21:23
dman, ha mo, Richard kirkcaldy, Shashank Tripathi, Universal Sea, Christian Schmidt-Guetter, D. F., http://www.ttnr.org


I think no because PHP is a server side executed scripting language.
May be you can write a PHP script on the remote installation which
loads your local PHP page and then executes it - but I haven't testet
it.
-------
Universal Sea says:
Actually yes you can - the only program I know of that currently 
supports this is Allaire's Homesite. (www.allaire.com). In its 
settings 
it allows you to set an external server for your browser, so when you 
preview your page, it sends the information to the remote server, 
parses the PHP and then returns it to your browser.
I did this at first but it became tiresome because it takes a little 
bit longer, and I have tons of different things to do. What I did to 
combat this is install the free Apache server on my PC, install PHP 
and 
mySQL, and now all I have to do is test it from my browser whenever I 
want to preview something.
-------
Shashank Tripathi says:
This is incorrect (the answer from Universal SEA). Homesite merely 
implements a browser API from Microsoft (since Homesite itself is 
written most likely in Visual C++ using MFC) and maps the server to a 
local Apache. If you do not have Apache installed locally, Homesite 
will not do much for your "browse" tab. Cheers.
-------
If you are really desperate to do this then you could create a link 
from file.phps to file.php on the remote server, then use a script on 
the local server to grab the file.phps and then do something with it.  
It does seem pretty pointless though.