Quote:
Originally posted by KuraFire
Uhm, why would that give a javascript error?? The PHP is parsed out of there before it reaches the browser, and javascript isn't processed until it reaches the browser.
Or am I talking nonsense??
|
Well, if you have <?php echo $something ?> in the middle of the javascript, and that page is not parsed through php, then the <?...?> code is outputted to the client as part of the php/script source. And, when java parses the script, it stubles on illegal elements that shouldn't be there.
[QUOTE]
Originally posted by KuraFire
Also: if a server parses .html files, doesn't that mean it Checks the entire .html file to see if there is any PHP code inside it, anywhere? I do believe that that's what parsing is.. :/
And if so, it _would_ provide some extra server loads if you do it on a large scale (100+ visits per minute) - all those php, asp, etc. tutorials speak about how you shouldn't use .php extensions if you don't have any PHP in the file, to prevent needless server parsing, i.e. server loads.