Re: How to call external php script from html? [message #172909 is a reply to message #172902] |
Fri, 11 March 2011 15:17 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Mar 11, 1:51 pm, "astral" <ast...@news.eternal-september.org>
wrote:
> How to call external php file from html page? Renaming page from .html to
> .php not suitable due many reasons. Modifying .htaccess file to make the PHP
> executable on the .html pages also not suitable. Calling PHP script from an
> external javascript not work:
> <script type="text/javascript"
> src="http://www.domain.com/file.php"></script>
> Calling from Iframe work, but its too ugly, I need specify width/height for
> iframe, whereas php script need display html output without iframe
> limitations.
> <iframe src="http://www.domain.com/file.php" width="600"
> height="300"></iframe>
>
> I there some other method?
Assuming an apache server, use a rewrite rule to have the "page name"
displayed as .html whilst executing a php file in the background.
A "page" does not have a "name" except that which is shown in the
browser. Many php or indeed other files may be used to create what is
seen as a "page" in a browser.
|
|
|