I'm a total newbie when it comes to php, but i want to add php includes on my site. Does anyone know any good references for this? They will be basic includes, header, footer and sidebar. Thanks in advance
Yeah - I spent 3hrs trying to test my php tags for syntax errors on my first attempt at includes... ...yeah...I was tying to get PHP included tages to work in an HTML page. Some days you feel like 'Man, I'm REALLY getting this!' other days...you just want to bury your head in the mud
I had the same problem AzAkers, as soon as I followed the example in the link above I understood what I was doing wrong.
The example cited shows how to create a php file with html includes using the php include function. The question is, how do I add php commands to my html pages if I'm understanding correctly? If so you can add one line to your .htaccess file for your apache driven site and have php parsed in html files. AddType application/x-httpd-php .php .html With that, you can have php blocks parsed in your html files so long as ya put the php code in php tags. <?php include("somefile"); ?> PHP: