Forum Moderators: coopster

Message Too Old, No Replies

php includes - indexed or not?

         

Jeeek

2:00 pm on Dec 15, 2004 (gmt 0)

10+ Year Member



I got an page here, where all the content comes from an content.php + includes - let's say:

content.php:
<html>
<head><title></title></head>
<body>
<?
if ($_GET["what"] == "home") include("home.inc.php");
else include(something.inc.php);
?>
</body>
</html>

the home.inc.php could look like this:

<table>
<tr><td>Lorem ipsum dolor sit amet</td></tr>
</table>

a link would look like that:
content.php?what=home

will google spider this *.inc.php stuff?

(btw - could anyone post some link covering php vs SEO, please?)

Romeo

3:05 pm on Dec 15, 2004 (gmt 0)

10+ Year Member



Hi Jeeek,

yes and no.
The SE will not spider the *.inc.php file per se (if there are no external href-links to it, of course), but will see its content when GETing "content.php" as the content of the *.inc.php is fetched by your server and put into the "content.php" at the place where your "include" statement is.

An additional hint:
You may prevent explicit external calling of your *inc.php files by defining a php $variable before the first "include" in your "content.php" and putting some php code like
if (!$variable) then {
echo "move on, there's nothin' to see here";
exit;
}
on top of each of your *.inc.php files.

Regards,
R.