<?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:  include]]></title>
		<link>https://punbb.informer.com/forums/topic/15791/php-include/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/15791/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in PHP:  include.]]></description>
		<lastBuildDate>Fri, 11 May 2007 19:00:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/94115/#p94115</link>
			<description><![CDATA[<p>ha, that works!&nbsp; thanks man.</p><p>1 bug down, 4 million to go.</p>]]></description>
			<author><![CDATA[null@example.com (eric235u)]]></author>
			<pubDate>Fri, 11 May 2007 19:00:14 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/94115/#p94115</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/94112/#p94112</link>
			<description><![CDATA[<p>Your problem is that you need to declare a variable global at the start of every function. Even in classes. So put<br />global $db;<br />as the first line of your function and it&#039;ll work.</p>]]></description>
			<author><![CDATA[null@example.com (elbekko)]]></author>
			<pubDate>Fri, 11 May 2007 18:41:09 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/94112/#p94112</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/94110/#p94110</link>
			<description><![CDATA[<p>i&#039;m currently reading more about objects.&nbsp; forgive my newbian questions.&nbsp; my little object doesn&#039;t have access to $db...</p><div class="quotebox"><blockquote><p>define(&#039;PUN_ROOT&#039;, &#039;./&#039;);<br />require PUN_ROOT.&#039;include/common.php&#039;;<br />define(&#039;PUN_ALLOW_INDEX&#039;, 1);<br />require PUN_ROOT.&#039;header.php&#039;;</p><p>// the scrape object<br />class punscrape<br />{<br />&nbsp; &nbsp; function do_scrape()<br />&nbsp; &nbsp; {</p><p>// let&#039;s check if the torrent(s) need to be scraped.<br />$table = $db-&gt;prefix(&#039;puntracker&#039;);<br />...</p></blockquote></div><p>it gives me <em>call to a member function on a non-object</em>.&nbsp; it seems i need to learn about scope???&nbsp; anybody got a good link to some literature to help?&nbsp; tia.</p>]]></description>
			<author><![CDATA[null@example.com (eric235u)]]></author>
			<pubDate>Fri, 11 May 2007 18:29:04 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/94110/#p94110</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/93859/#p93859</link>
			<description><![CDATA[<p>yep i&#039;m including common.php on both pages.&nbsp; so if i can&#039;t do that, how can i use the database object in my &#039;scraper&#039; page?&nbsp; when i remove common.php i get<br /></p><div class="quotebox"><blockquote><p>PHP Fatal error:&nbsp; Call to a member function on a non-object in /testforum/punscrape.php on line 31</p></blockquote></div><p>which is right where i use $db</p><p>do i use something else like include common_db.php?</p><p>thanks a ton for any assistance.&nbsp; i almost have a bittorrent tracker module ready but i&#039;m banging my head on this last part.&nbsp; it&#039;s turned out to be a little harder than i expected!</p>]]></description>
			<author><![CDATA[null@example.com (eric235u)]]></author>
			<pubDate>Tue, 08 May 2007 20:50:07 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93859/#p93859</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/93857/#p93857</link>
			<description><![CDATA[<p>Are you including common.php on both pages? If so, that&#039;s your issue</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Tue, 08 May 2007 20:44:25 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93857/#p93857</guid>
		</item>
		<item>
			<title><![CDATA[Re: PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/93852/#p93852</link>
			<description><![CDATA[<p>ok, on my index page i include my scraper page.&nbsp; on my index page i instantiate the scraper object on my scraper page.&nbsp; but i get this error.<br /></p><div class="quotebox"><blockquote><p>[08-May-2007 20:33:08] PHP Fatal error:&nbsp; Cannot redeclare check_cookie() (previously declared in /testforum/include/functions.php:28) in /testforum/include/functions.php on line 28</p></blockquote></div><p>any tips for a newb?</p><p>thanks.</p>]]></description>
			<author><![CDATA[null@example.com (eric235u)]]></author>
			<pubDate>Tue, 08 May 2007 20:38:26 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93852/#p93852</guid>
		</item>
		<item>
			<title><![CDATA[PHP:  include]]></title>
			<link>https://punbb.informer.com/forums/post/93395/#p93395</link>
			<description><![CDATA[<p>hi all.&nbsp; i&#039;m attempting to write up a bittorrent tracker module for PunBB but i&#039;m new at this stuff.&nbsp; i have one page that displays torrent info from the database, called puntracker.php.&nbsp; but i have another page called punscrape.php that scrapes other trackers and updates mysql.&nbsp; so my newb question is what&#039;s the best way to do this?&nbsp; can i just put <br />include(PUN_ROOT.&#039;punscrape.php&#039;);<br />or something similar to evaluate the file or is this stupid?&nbsp; thanks for any tips.</p>]]></description>
			<author><![CDATA[null@example.com (eric235u)]]></author>
			<pubDate>Wed, 02 May 2007 20:02:09 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93395/#p93395</guid>
		</item>
	</channel>
</rss>
