<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1029699" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1029699</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-includes-help-needed#comment-1174018</link>
    <description> &lt;p&gt;oh man, I see the problem I think, you&#039;re trying to include an image. &quot;‰PNG  IHDR!k.)ÅósRGB&quot; that not how to do it.&lt;/p&gt;
&lt;p&gt;php include&#039;s purpose is to include other php files, so you can write code and functions once, and include them on multiple pages. What you should do is have &quot;image_include.php&quot; that contains &lt;img src=&quot;image.png&quot; /&gt; then include that in all the pages.&lt;/p&gt;
 </description>
     <pubDate>Thu, 30 Jun 2005 13:50:15 +0000</pubDate>
 <dc:creator>CptAwesome</dc:creator>
 <guid isPermaLink="false">comment 1174018 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-includes-help-needed#comment-1173974</link>
    <description> &lt;p&gt;Well right now it looks like that on the page where you tried the code, you are telling it to include a .PNG file. The reason it is messed up is becasue it is trying its best to display the &lt;em&gt;CHARACTERS&lt;/em&gt; in the file.&lt;/p&gt;
&lt;p&gt; Both &lt;strong&gt;INCLUDE&lt;/strong&gt; and &lt;strong&gt;REQUIRE&lt;/strong&gt; take the file you specify, and read it like it was part of the current file. Therefore, you cannot just say something like &lt;strong&gt;include (&#039;myresume.doc&#039;);&lt;/strong&gt; and then expect to see a Word document formatted on the screen. It will take the file as it sees it (open it with a text editor such as notepad) and send it straight to the browser.&lt;/p&gt;
&lt;p&gt; The included file is EXPECTED to be a valid HTML and/or PHP file. Note that when the included file gets processed, it starts out with HTML, not PHP, so if you have PHP code in the included file, inside the included file you need to start off with &amp;lt;? and end with ?&amp;gt;&lt;/p&gt;
&lt;p&gt; Lastly, make sure that you do not have one &quot;complete&quot; web page include another. By complete, I&#039;m referrign one that has all the proper  tags, only one of the files should have this.&lt;/p&gt;
&lt;p&gt; See &lt;a href=&quot;http://www.php.net/include/&quot; class=&quot;bb-url&quot;&gt;http://www.php.net/include/&lt;/a&gt; for more information and examples. From this page I didn&#039;t see anything about require not being valid anymore. It is not the exact same as include anyhow. A failed &lt;strong&gt;include&lt;/strong&gt; gives a warning, a failed &lt;strong&gt;require&lt;/strong&gt; errors out.&lt;/p&gt;
&lt;p&gt; -Greg&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jun 2005 14:36:22 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1173974 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-includes-help-needed#comment-1173971</link>
    <description> &lt;p&gt;Also, while I am not positive about this, but I believe the &quot;require&quot; oiption is set for deprication from php isn&#039;t it? I might be wrong there, but I thought I read that recently. If proven to be true, using only include or include_once would be the best course of action.&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jun 2005 14:02:41 +0000</pubDate>
 <dc:creator>dbmasters</dc:creator>
 <guid isPermaLink="false">comment 1173971 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-includes-help-needed#comment-1173739</link>
    <description> &lt;p&gt;OptionBlock, how are you including the page? It would help if we saw the relevant code on test.php&lt;/p&gt;
&lt;p&gt;Just for reference, there are a few ways to include pages in another .php page:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;include(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;file.html\&quot;);&lt;br /&gt;include_once(\&quot;file.html\&quot;);&lt;br /&gt;&lt;br /&gt;require(\&quot;file.html\&quot;);&lt;br /&gt;require_once(\&quot;file.html\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;If you want to get a bit more complicated, you could check to see if the file exists before including it.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;file_exists&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;file.html\&quot;)){&lt;br /&gt;include(\&quot;file.html\&quot;);&lt;br /&gt;} else {&lt;br /&gt;echo \&quot;File &#039;file.html&#039; does not exist\&quot;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Jun 2005 02:35:21 +0000</pubDate>
 <dc:creator>Renegade</dc:creator>
 <guid isPermaLink="false">comment 1173739 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
