Jump to content

Home

PHP Question


ZBomber

Recommended Posts

I've been working on trying to get my website better lately. Since I currently use IFrames, Google and other search engines don't really like it. So I'm starting to change it all to php. My big question: If I'm just adding a few php SSI's, do I need to change all the pages from .html to .php?

 

Thanks

Link to comment
Share on other sites

What do you mean by php SSIs?

 

Do you mean that you're includ()ing files via php?

If so , yes, you do have to rename your files to .php.

 

If you mean that you're using a server side include to include a php document, leave your extensions as .shtml.

Link to comment
Share on other sites

SSI (Server Side Includes) Will function if your host supports it (usually if its perl compatible) then you just change your extensions to .shtml .Its really easy for posting news if you have the SSI include news.txt or some other file thats easy to update.

Link to comment
Share on other sites

Originally posted by joetheeskimo5

Don't you need parantheses like you do for require()? It's a function, after all.

 

<?php include("top.htm"); ?>

Either will work, if I recall correctly. I always include them for good measure.

 

Also, if you want to surpress warnings and error messages that arise because of the include, you can prefix the command with the @ symbol.

<?php @include("top.htm"); ?>

Now if the file is missing, the user will be none the wiser.

Link to comment
Share on other sites

Originally posted by matt--

Either will work, if I recall correctly. I always include them for good measure.

 

Also, if you want to surpress warnings and error messages that arise because of the include, you can prefix the command with the @ symbol.

<?php @include("top.htm"); ?>

Now if the file is missing, the user will be none the wiser.

 

I learned to do the same with database queries....does it work for any function?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...