<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>includes Archives &#8902; Schaffen Creative</title>
	<atom:link href="https://www.schaffencreative.com/tag/includes/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.schaffencreative.com/tag/includes/</link>
	<description>Make. Manage. Achieve.</description>
	<lastBuildDate>Tue, 06 Mar 2018 03:14:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.schaffencreative.com/wp-content/uploads/2018/02/schaffen_creative-500x500-100x100.png</url>
	<title>includes Archives &#8902; Schaffen Creative</title>
	<link>https://www.schaffencreative.com/tag/includes/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>PHP Includes &#8211; Talking HTML</title>
		<link>https://www.schaffencreative.com/past-episodes/php-includes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-includes</link>
		
		<dc:creator><![CDATA[Norm]]></dc:creator>
		<pubDate>Wed, 17 Feb 2016 22:33:45 +0000</pubDate>
				<category><![CDATA[past episodes]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[talking html]]></category>
		<category><![CDATA[includes]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.webdevpod.com/?p=279</guid>

					<description><![CDATA[<p>PHP includes are a vital aspect of websites and should be incorporated into every Web Developer&#8217;s workflow. Code via Chris Coyier and the CSS Tricks website    Main reason for using a PHP include: All code for a specific function is under 1 roof. If you need to make a change you change it in 1 [&#8230;]</p>
<p>The post <a href="https://www.schaffencreative.com/past-episodes/php-includes/">PHP Includes &#8211; Talking HTML</a> appeared first on <a href="https://www.schaffencreative.com">Schaffen Creative</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="color: #000000;">PHP includes are a vital aspect of websites and should be incorporated into every Web Developer&#8217;s workflow. </span></p>
<h2></h2>
<h2><span style="color: #000000;">Code via <span style="color: #ff0000;"><a style="color: #ff0000;" href="https://twitter.com/chriscoyier">Chris Coyier</a></span> and the <span style="color: #ff0000;"><a style="color: #ff0000;" href="https://css-tricks.com/php-include-from-root/">CSS Tricks website</a></span>   </span></h2>
<h2><span style="color: #000000;">Main reason for using a PHP include:</span></h2>
<ol>
<li><span style="color: #000000;"> All code for a specific function is under 1 roof.</span>
<ol>
<li><span style="color: #000000;">If you need to make a change you change it in 1 spot instead of going to each and every individual page</span></li>
</ol>
</li>
</ol>
<p><span style="color: #000000;">When using and creating includes the files need to have the php extension on the file. </span></p>
<p><span style="color: #000000;">Index.html turns into index.php  </span></p>
<h2><span style="color: #000000;">Popular includes to create:</span></h2>
<p><span style="color: #000000;">Footer.php</span><br />
<span style="color: #000000;">Header.php</span><br />
<span style="color: #000000;">Navigation.php </span></p>
<h3><span style="color: #000000;">Other examples:</span></h3>
<p><span style="color: #000000;">Meta data/ stylesheets/ head information</span><br />
<span style="color: #000000;">Social media</span><br />
<span style="color: #000000;">Separate website tracking code if you don’t/can’t include it in the footer.  </span></p>
<h2><span style="color: #000000;">General include statement: </span></h2>
<p><span style="color: #000000;">&lt;?php include(&#8220;header.php&#8221;); ?&gt;</span></p>
<h2><span style="color: #000000;">PHP include statement from root.</span></h2>
<p><span style="color: #000000;">&lt;?php</span><br />
<span style="color: #000000;"> $path = $_SERVER[&#8216;DOCUMENT_ROOT&#8217;];</span><br />
<span style="color: #000000;"> $path .= &#8220;/common/header.php&#8221;;</span><br />
<span style="color: #000000;"> include_once($path);</span><br />
<span style="color: #000000;"> ?&gt;</span></p>
<p><span style="color: #000000;">DISCLAIMER: when using PHP includes you HAVE TO ensure ALL OF YOUR LINKS are sourced from the root.</span></p>
<ul>
<li><span style="color: #000000;">All internal navigation</span></li>
<li><span style="color: #000000;">Direct links from 1 page to another that is not in the navigation</span></li>
<li><span style="color: #000000;">Image file locations</span></li>
</ul>
<p><span style="color: #000000;">Generally speaking this is something to get into the habit of doing anyway, that way if you move something you don’t have to remember to fix the link. Also I do believe that this is a general web standard.</span></p>
<h3><span style="color: #ff0000;"><a style="color: #ff0000;" href="http://www.webdevpod.com">webdevpod.com</a></span></h3>
<h3><span style="color: #ff0000;">@tommnorman</span></h3>
<h3><span style="color: #ff0000;">@TNPWDesign</span></h3>
<p>The post <a href="https://www.schaffencreative.com/past-episodes/php-includes/">PHP Includes &#8211; Talking HTML</a> appeared first on <a href="https://www.schaffencreative.com">Schaffen Creative</a>.</p>
]]></content:encoded>
					
		
		<enclosure url="http://media.blubrry.com/talkinghtml/content.blubrry.com/talkinghtml/PHP_Includes.mp3" length="15290244" type="audio/mpeg" />

			</item>
	</channel>
</rss>
