<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — PHP -- Including files in functions]]></title>
		<link>https://punbb.informer.com/forums/topic/5516/php-including-files-in-functions/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/5516/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in PHP -- Including files in functions.]]></description>
		<lastBuildDate>Thu, 30 Dec 2004 21:23:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28454/#p28454</link>
			<description><![CDATA[<p>works <img src="https://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /><br />I really need to tidy up my PHP. I always relie and stuff like register_globals in php.ini..</p><p>Thanks <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Gary13579)]]></author>
			<pubDate>Thu, 30 Dec 2004 21:23:14 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28454/#p28454</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28449/#p28449</link>
			<description><![CDATA[<p>all variables in functions are separate to functions elsewhere in the script, if you want to share variables you need to say</p><p>global $var1, $var2, $var3;</p><p>etc at the beginning of the function, for arrays you just name the array e.g. for $player[style] just say $player</p>]]></description>
			<author><![CDATA[null@example.com (Connorhd)]]></author>
			<pubDate>Thu, 30 Dec 2004 21:14:46 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28449/#p28449</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28446/#p28446</link>
			<description><![CDATA[<p>global what? Ive never used global, so I dont know what Id have to do.</p>]]></description>
			<author><![CDATA[null@example.com (Gary13579)]]></author>
			<pubDate>Thu, 30 Dec 2004 21:02:43 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28446/#p28446</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28380/#p28380</link>
			<description><![CDATA[<p>won&#039;t you need to global all the variables in footer.php in function quiting($message) {?</p>]]></description>
			<author><![CDATA[null@example.com (Connorhd)]]></author>
			<pubDate>Thu, 30 Dec 2004 10:48:38 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28380/#p28380</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28369/#p28369</link>
			<description><![CDATA[<p>footer.php will load fine on its own. header.php handles the login stuff (and other needed routines) as well as most of the style. footer.php has a little bit of style,&nbsp; but it also has a mini chat type thing an a banner ad.</p><p>Wait a minute... To complicate things even further, the banner ad from footer.php is loading!<br />Heres footer.php<br /></p><div class="codebox"><pre><code>    &lt;/td&gt;
            &lt;td class=&quot;tblright&quot;&gt; &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
            &lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$stat[style]&quot;; ?&gt;/tnav_bl.gif&quot; width=&quot;14&quot; height=&quot;26&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
            &lt;td class=&quot;tblbot&quot;&gt; &lt;/td&gt;
            &lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$stat[style]&quot;; ?&gt;/tnav_br.gif&quot; width=&quot;15&quot; height=&quot;26&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
        &lt;/tr&gt;


&lt;?php
if ($player[gold_member] || $player[babble_box]) {
?&gt;
&lt;!------begin babblebox---------&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$player[style]&quot;; ?&gt;/tnav_tl.gif&quot; width=&quot;14&quot; height=&quot;23&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
            &lt;td width=&quot;100%&quot; class=&quot;tbltop&quot;&gt; &lt;/td&gt;

            &lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$player[style]&quot;; ?&gt;/tnav_tr.gif&quot; width=&quot;15&quot; height=&quot;23&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class=&quot;tblleft&quot;&gt; &lt;/td&gt;
            &lt;td background=&quot;templates/&lt;?php echo &quot;$player[style]&quot;; ?&gt;/cellbg.gif&quot; id=&quot;charon_page_content&quot;&gt;
&lt;!---------------&gt;
&lt;iframe src=&quot;babblebox.php&quot; name=&quot;sbox&quot; width=&quot;100%&quot; height=&quot;200&quot; frameborder=&quot;0&quot; id=&quot;bbox&quot;&gt;Your browser does not support inline frames! The Babble Box will not be available until you upgrade to a newer &lt;a href=&quot;http://www.mozilla.org&quot; target=&quot;_new&quot;&gt;browser&lt;/a&gt;.&lt;/iframe&gt;
&lt;!---------------&gt;
&lt;/td&gt;
&lt;td class=&quot;tblright&quot;&gt; &lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;
&lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$player[style]&quot;; ?&gt;/tnav_bl.gif&quot; width=&quot;14&quot; height=&quot;26&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
&lt;td class=&quot;tblbot&quot;&gt; &lt;/td&gt;
&lt;td&gt;&lt;img src=&quot;templates/&lt;?php echo &quot;$player[style]&quot;; ?&gt;/tnav_br.gif&quot; width=&quot;15&quot; height=&quot;26&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!---------------&gt;
&lt;?php
}

?&gt;
    &lt;/table&gt;

&lt;center&gt;&lt;br&gt;&lt;!-- Clicksor.com Advertising Code Begin --&gt;
&lt;script type=&#039;text/javascript&#039;&gt;
&lt;!--
clicksor_banner_border = &#039;#000000&#039;;
clicksor_banner_ad_bg = &#039;#333333&#039;;
clicksor_banner_link_color = &#039;#FFFF00&#039;;
clicksor_banner_text_color = &#039;#ffffff&#039;;
clicksor_banner_image_banner = false;
//--&gt;
&lt;/script&gt;
&lt;script type=&#039;text/javascript&#039; src=&#039;http://www.clicksor.com/showAd.php?pid=5062&amp;sid=6680&amp;adtype=2&#039;&gt;&lt;/script&gt;
&lt;!-- Clicksor.com Advertising Code End --&gt;&lt;/center&gt;
    &lt;/TD&gt;
        &lt;/TR&gt;
    &lt;/TABLE&gt;
&lt;/CENTER&gt;

&lt;/BODY&gt;
&lt;/HTML&gt;</code></pre></div><p>The style and chat wont load, but the banner ad loads fine.</p><p>edit: I love the way that 1.2 handles the code tags <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Gary13579)]]></author>
			<pubDate>Thu, 30 Dec 2004 01:37:41 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28369/#p28369</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28368/#p28368</link>
			<description><![CDATA[<p>What does footer.php do then? What happens if you access just footer.php?</p>]]></description>
			<author><![CDATA[null@example.com (Rickard)]]></author>
			<pubDate>Thu, 30 Dec 2004 01:29:17 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28368/#p28368</guid>
		</item>
		<item>
			<title><![CDATA[PHP -- Including files in functions]]></title>
			<link>https://punbb.informer.com/forums/post/28365/#p28365</link>
			<description><![CDATA[<p>Heres my problem. I have a file that handles many functions (functions.php). One of those functions echos a message, includes footer.php, and exits.<br />It displays the message fine, and exits, but just wont load the footer.php file.</p><p>Heres some code to help explain further</p><div class="codebox"><pre><code>##functions.php
#
// This function will end the scirpt. and echo $message
function quiting($message) {
    echo $message;
    include(&quot;footer.php&quot;);
    exit;
}
#
##whatever.php
quiting(&quot;message&quot;);

#</code></pre></div><p>and it doesnt work!<br />What it does is exucute the file perfectly up to the quiting(&quot;message&quot;);, then it will echo &quot;message&quot;, and quit the script, without loading footer.php.</p><p>Anyone know what to do, or could it just be my server, and some setting I could fix in PHP.ini?</p>]]></description>
			<author><![CDATA[null@example.com (Gary13579)]]></author>
			<pubDate>Thu, 30 Dec 2004 01:16:50 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/28365/#p28365</guid>
		</item>
	</channel>
</rss>
