Re: Re: PHP files in the SRC attribute of an SCRIPT element
| From: | Karl-Heinz Christian Zeck | Date: | Fri, 17 Mar 2006 16:39:46 +0000 |
| Subject: | Re: Re: PHP files in the SRC attribute of an SCRIPT element | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232142@lists.php.net to get a copy of this message | ||
Thank you very much. That was the problem, I didn't noticed that I don't use
the server path.
On 3/17/06, Barry <barry@flyerheaven.de> wrote:
>
> Karl-Heinz Christian Zeck wrote:
> > Thank you for your quick reply.
> >
> > I tried to modify the file. I removed all it's content and wrote only a
> > single line:
> > alert("test");
> >
> > When I refresh the main page, I get the alert message - this means the
> file
> > was loaded successfuly.
> >
> > Then I tried this code: alert("<?php echo 'test';?>");
> >
> > This way it doesn't work, no alert message, so the file wasn't loaded.
> >
> > Any ideas?
> >
> Thats because you don't load the Javascript file over HTTP and load it
> locally.
> The webserver doesn't parse it that way.
> That way he just reads it and thats why it isnt parsed
>
> --
> Smileys rule (cX.x)C --o(^_^o)
> Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>