Assume I have had someone give me a static layout of a XHTML strict (not transitional) page. I want to merge my existing PHP page into that new page. Other than eliminating the deprecated elements like <center></center>, how would I integrate it? Do I just lump all the PHP code into the new document and put it between <?php and ?>?
One thing though -- if you choose to include the xml declaration with your XHTML page, make sure you echo it with PHP, otherwise (if you have short_tags turned on) the PHP parser will complain about it.
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
Well, you can login and see if the server is reading PHP. Then, make up a page where the only thing it should say is hello in the php file. See if the server is viewing php, then if it is parsing php code.
If both are true, look at the html file itself when viewed in your browser. I have had instance where, by using some positioning tags, the debugging messages I was using were not easily seen..maybe this is what is going on.
Other possibilities that I am assuming you have done...
Save the page as a .php or .php4, or whatever extension you have you server set to view php files.
Making sure that your php tagging is accurate, no wrong special characters.
Please post back and let us know if you got it workin or not
Maybe my underestanding of XHTML is all wrong. My site is completely PHP accessing a MySQL database. All pages are *.php. I was given a new layout for the site that I really like that is XHTML strict, but the person who made it did not include the PHP stuff. I was assuming that I could add in all the MySQL queries into the *.html file I was given using <?php and ?>. Is my understnading wrong?
Yes, get familiar with the presentation coding you are using, and then start implementing your server-side code.
As for that, indeed, you will simply write your query, and then jsut place the strings in the areas of the 'templated' html file, but, you msut save it as a .php, o .php3, or .php4(.php is now the standard).
Good that you found out what was wrong and learned from it!
yeah, but most servers are under utilized anyway. And the resources it takes to parse for php are minimal to the resources it takes to run php. Not saying that there aren't circumstances where this would be a bad idea. I just don't think this is one of them.