<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Basic file includes</title>
	<atom:link href="http://www.stuffbysarah.net/2005/08/26/basic-file-includes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/</link>
	<description>PHP, WordPress and Business Ramblings</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:31:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-14853</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Wed, 16 Jul 2008 09:05:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-14853</guid>
		<description>Well it should give you the basics. I kind of ran out of time after a while but to be honest once the basics make sense a book would most likely be the next step. The SitePoint Learning PHP book is a good choice.</description>
		<content:encoded><![CDATA[<p>Well it should give you the basics. I kind of ran out of time after a while but to be honest once the basics make sense a book would most likely be the next step. The SitePoint Learning PHP book is a good choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Eilbeck</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-14844</link>
		<dc:creator>Marc Eilbeck</dc:creator>
		<pubDate>Tue, 15 Jul 2008 20:08:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-14844</guid>
		<description>Very nice guide to learning php. Its something ive always wanted to learn so I think I will be coming back and reading the whole guide at some point!</description>
		<content:encoded><![CDATA[<p>Very nice guide to learning php. Its something ive always wanted to learn so I think I will be coming back and reading the whole guide at some point!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-215</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Sat, 04 Feb 2006 18:01:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-215</guid>
		<description>Not really. .inc just stands for include. It&#039;s not a recognised file extension as is parsed by browsers as plain text.

.inc and .inc.php are just used by programmers so they realise that they&#039;re includes.

When you start on large sites and working with lots of files, it makes understanding a file structure easier.</description>
		<content:encoded><![CDATA[<p>Not really. .inc just stands for include. It&#039;s not a recognised file extension as is parsed by browsers as plain text.</p>
<p>.inc and .inc.php are just used by programmers so they realise that they&#039;re includes.</p>
<p>When you start on large sites and working with lots of files, it makes understanding a file structure easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pest</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-214</link>
		<dc:creator>pest</dc:creator>
		<pubDate>Sat, 04 Feb 2006 17:49:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-214</guid>
		<description>phew! was worried I had some re-building to do there!

still I guess it&#039;s possible that my includes might contain something important in the future!

is there any benifit to .inc?</description>
		<content:encoded><![CDATA[<p>phew! was worried I had some re-building to do there!</p>
<p>still I guess it&#039;s possible that my includes might contain something important in the future!</p>
<p>is there any benifit to .inc?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-213</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Sat, 04 Feb 2006 17:44:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-213</guid>
		<description>Good point. I said what to do but not why. A .inc file will be parsed by a browser as plain text. This is fine if that .inc file doesn&#039;t contain any important information. But when you come to start placing in sensitive information, which can range from the top most ie. usernames and passwords through to even the knowledge of variable names, then someone could use the information they can see and compromise your site or even the server you&#039;re on.

By using .inc.php you&#039;re telling yourself it&#039;s an include file but you&#039;re telling the browsers to parse it as PHP, therefore any PHP would be executed, not displayed for all to see.

For example, if you have

&lt;code&gt;&lt;?php
// config.inc - store mysql connection details
$username = &quot;dbuser&quot;;
$password = &quot;dbpass&quot;;
?&gt;&lt;/code&gt;

a simple include with your mysql username and password in for use throughout the site for database connections. Well if I could view that as plain text then I&#039;d know your username and password.

So ideally I tend to use .php for PHP pages, .inc.php for includes, .fnc.php for functions and .scr.php for pure script. Just makes it easier to find files on very large sites.</description>
		<content:encoded><![CDATA[<p>Good point. I said what to do but not why. A .inc file will be parsed by a browser as plain text. This is fine if that .inc file doesn&#039;t contain any important information. But when you come to start placing in sensitive information, which can range from the top most ie. usernames and passwords through to even the knowledge of variable names, then someone could use the information they can see and compromise your site or even the server you&#039;re on.</p>
<p>By using .inc.php you&#039;re telling yourself it&#039;s an include file but you&#039;re telling the browsers to parse it as PHP, therefore any PHP would be executed, not displayed for all to see.</p>
<p>For example, if you have</p>
<p><code>&lt;?php<br />
// config.inc - store mysql connection details<br />
$username = "dbuser";<br />
$password = "dbpass";<br />
?&gt;</code></p>
<p>a simple include with your mysql username and password in for use throughout the site for database connections. Well if I could view that as plain text then I&#039;d know your username and password.</p>
<p>So ideally I tend to use .php for PHP pages, .inc.php for includes, .fnc.php for functions and .scr.php for pure script. Just makes it easier to find files on very large sites.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pest</title>
		<link>http://www.stuffbysarah.net/2005/08/26/basic-file-includes/comment-page-1/#comment-211</link>
		<dc:creator>pest</dc:creator>
		<pubDate>Sat, 04 Feb 2006 17:28:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-211</guid>
		<description>Hi,

I just started using xhtml and basic includes (about three months ago)

except i&#039;ve been using (for example) &quot;footer.inc&quot;,
rather than - &quot;footer.inc.php&quot;

is this a problem?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I just started using xhtml and basic includes (about three months ago)</p>
<p>except i&#039;ve been using (for example) &#034;footer.inc&#034;,<br />
rather than &#8211; &#034;footer.inc.php&#034;</p>
<p>is this a problem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

