Forum Moderators: open
Any help would be much appreciated.
However, then I need to save the files as php files, right? So I lose my rankings with the pages that have html extensions? If so, at least I can do this for any new sites I build, and one that I'm far enough down that no one would notice. Or do I have this wrong?
require() I guess so. Not an issue I'm experienced with, though it sounds like
include() may be preferable The two constructs are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless.
(The PHP Manual: [php.net...]
Try here for all the ammo:
[webmasterworld.com...]
Changing file extensions.
Yes, this is an issue (with all server scripting langs). There are a couple of solutions.
1) It's not so hard to direct your server to process the PHP in all
.html files, or those within certain directories. This isn't inefficient if all your files in those directories contain some PHP. 2) On Apache/Unix you can, distinguish those
.html files that you want PHP-processed by setting them as executeables. The "XBitHack"? If you're likely to change your scripting language in the future, these options may still be good.
Try: [webmasterworld.com...]
Good luck.