|
Posted by Nospam on 10/11/06 00:23
"Harlan Messinger" <hmessinger.removethis@comcast.net> wrote in message
news:4p1u34Fgq7g2U1@individual.net...
> Nospam wrote:
> > I am trying to execute a php script within an iframe, if I open up the
html
> > page on a standalone browser the php code executes, but running it from
my
> > server nothing happens, I basically have an html page
> > <html>
> > ...
> > <iframe>
> > link to php script
> > </iframe>
> > </html>
> >
> > Is there something blatant I am doing wrong?
>
> Your questions are hard to answer because you keep explaining the
> situation and what you're attempting to do in vague or meaningless terms
> instead of with relevant information. PHP scripts don't execute with an
> IFRAME, they execute on a server. I don't know what you mean by opening
> "the" HTML page in a standalone browser (as opposed to what other kind
> of browser?) or why you are making a distinction between that and
> running it on a server--PHP *always* runs the server.
>
> Meanwhile you're not bothering to show the code. So how do we know
> what's causing the problem? We certainly can't tell from what you've
> told us. If you think we can, it reflects some misconceptions about the
> respective roles of the browser and the server and misunderstandings
> about which has what information and about what runs where.
>
> When a server receives a request, it has no idea whatsoever what was
> clicked or activated to generate that kind of request--a hyperlink, a
> button, a Javascript call initiated by a mouseover or timer, an address
> typed into the browser's address field. If it doesn't know that a
> hyperlink was clicked, it certainly doesn't know that the hyperlink is
> inside an IFRAME. The server just processes the request, generates a
> response, and sends it back to the browser.
>
> The browser is responsible for determining what to do with the response
> once it arrives. The browser has no idea how the response was
> generated--by HTML or binary code being read straight out of a file or
> by a program, be it ASP, PHP, JSP, Perl, etc., generating it dynamically.
Basically I have a php script that shows an image:
<?php
echo "<img src='http://www.example.com/image1.jpg' width='60' height='60'>";
?>
I also have an iframe that has this:
<iframe src="http://www.example.com/script1.php"></iframe>
However the image is not displayed at all (i.e the script is not run, but it
runs if I run it offline)
I am wondering what needs to be done for the script to run online
[Back to original message]
|