Look at this URL in Chrome and Firefox.
http://gymshuffle.com/contact.html
If FF, there's uninterpreted PHP code on the page. In Chrome there isn't.
What would cause the PHP to display in Firefox?
Look at this URL in Chrome and Firefox.
http://gymshuffle.com/contact.html
If FF, there's uninterpreted PHP code on the page. In Chrome there isn't.
What would cause the PHP to display in Firefox?
Your http server is not configured to send .html-files through the php-interpreter. Try to rename your file from index.html
to index.php
. Chances are good that this will probably work - but really, please ask your server administrator for help in this configuration issue.
Regards
rbo
That's interesting. If you look at the html source, you can see the php code in FF, but not in Chrome. Perhaps a MIME issue? You could also try changing the file extension to .php.
Firefox is considering everything from the <?php to the /> in the first <br /> tag to be one big HTML tag. Chrome is just ignoring everything in the PHP tags. In order to make the PHP work you have to change the file extension to .php
PHP is a server-side language, so none of the processing is done by the browser.
That's interesting, it looks like Chrome realizes that what's between >?php and? < isn't a browser tag, and is instead maleformed HTML, and never lets it get to the rendered HTML tree. You can see a much simpler version of the same thing here
Source code
<?php echo ('test'); ?>
test
URL:
http://alanstorm.com/testbed/chrome-php.html
If you view source with Chrome the PHP code isn't displayed. If you do it with Firefox it is.
The important thing to remember here is that your PHP code isn't being executed. Chrome downloads the page with the raw PHP code in it, sees the raw PHP code, and removes it before rendering the page.
PHP is server-side. The browser has nothing to do with the interpretation of it.