|
Posted by Rik on 05/11/06 02:49
Jacques Jamain wrote:
> In the dhtml page, the
> generated statment <?php include('fspecs') ?>
> is ignored. I've the feeling that I'm overlooking something in the
> way php is parsing dhtml (if it does).
What do you mean, generated statement? Is 'fspecs' a file, and do you
already include it while sending the page to the browser? How do you
generate it?
The server side php can perform actions on the server, and output data to
browsers. With a few exceptions, it doesn't really care about what data,
that's your job as programmer. Sending HTML or JS is equal to sending pdf or
txt, it's just data... No checking for validity, no parsing.
PHP can't be executed on the clients machine, so if you generate <?php
include('fspecs') ?> with javascript, it's just nonsense to your browser.
So, building client side PHP code has no use, except when sending it back to
the server and eval() it, which is a huge security risk.
If it's generated on the server: echoing <?php //something ?> will not
execute it, look at eval().
If it's generated on the clients machine: look at javascipts
XHTMLhttprequest() instead.
If it's genuine PHP code on the server: what is the surrounding code, and
where does the file 'fspecs' reside?
Grtz,
--
Rik Wasmus
[Back to original message]
|