Are you restricted from changing the filename? The php on your server can't parse it as php unless the filename is .php I do believe Shannon is incorrect but I could be wrong.
The only downside is that google would have to reindex all of the new pages...and all the links would have to be changed...the site is over 100,000 pages of dynamically created, but now static content.
I added some php to an html page this last week and the beauty is when someone views the source it does not show the php. Shannon
Php is executed on the server side. The php is never shown. For example, my personal site is a php powered wordpress site: http://www.franklinfamily.org You won't see a lick of php code.
This is incorrect. You can if you tell your web server software to do so. in apache http.conf modify/add: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php .html .htm Code (markup): I just tested this for functionality and it works 100%
You don't have to do this strictly in the http.conf though; if the config allows for it -- you could do it in the .htaccess file as well.
allthewhile, The problem is that all of the pages are already .html and they need to stay that way. is there a way to implement a snippet of php code into a .html page?
so if i added this: to my .htaccess I should be able to just put the php code in? Thanks for all the help
Absoulutely YES because you instruct it to parse html pages as PHP also and any PHP code you put in that html page will be parse now
Yup, this is probably the easiest way without renaming all the files or modifying the code in any other fashion.
I have a HTML site/page and I need to add a Google Adsense Mobile Content ad. How can I go about doing that because the ad code is PHP, and instead of displaying the ad it displays the code....
the htaccess way is easy, though if you have access to your server's config files you can change which file extensions are classed as php files in the MIME types file.