You are here: Re: Problem including the other php file. « PHP Programming Language « IT news, forums, messages
Re: Problem including the other php file.

Posted by Ben Sehara on 06/09/07 06:50

I included the same and simple php file three times. It still shows the
first two. I checked the source. It is like this.

===================================================================
<table width="760" align="center">
<tr>
<td>First Table Here</td>
</tr>
<tr>
<td>
<!-- start of documents.php -->
<table width="70%">
<tr>
<td width="33%"><a href="./docs/doc1.pdf">Doc1</a></td>
<td width="33%"><a href="./docs/doc2.pdf">Doc2</a></td>
<td width="33%"><a href="./docs/doc3.pdf">Doc3</a></td>
</tr>
<tr>
<td width="33%"><a href="./docs/doc4.pdf">Doc4</a></td>
</tr>
</table>
<!-- end of documents.php -->
</td>
</tr>
<tr>
<td>Second Table Here</td>
</tr>
<tr>
<td>
<!-- start of documents.php -->
<table width="70%">
<tr>
<td width="33%"><a href="./docs/doc1.pdf">Doc1</a></td>
<td width="33%"><a href="./docs/doc2.pdf">Doc2</a></td>
<td width="33%"><a href="./docs/doc3.pdf">Doc3</a></td>
</tr>
<tr>
<td width="33%"><a href="./docs/doc4.pdf">Doc4</a></td>
</tr>
</table>
<!-- end of documents.php -->
===================================================================
The following is missing.

</td>
</tr>
<tr>
<td>Third Table Here</td>
</tr>
<tr>
<td>
<!-- start of documents.php -->
<table width="70%">
<tr>
<td width="33%"><a href="./docs/doc1.pdf">Doc1</a></td>
<td width="33%"><a href="./docs/doc2.pdf">Doc2</a></td>
<td width="33%"><a href="./docs/doc3.pdf">Doc3</a></td>
</tr>
<tr>
<td width="33%"><a href="./docs/doc4.pdf">Doc4</a></td>
</tr>
</table>
<!-- end of documents.php -->
</td>
</tr>
</table>

The included file itself is showing right, but it stopped right after the
second included file. The documents.php file seems to be fine. Something
wrong with html tag? It's very simple though.

Ben


"Jon Slaughter" <Jon_Slaughter@Hotmail.com> wrote in message
news:bUiai.745$TC1.500@newssvr17.news.prodigy.net...
>
> "Ben Sehara" <sehara@hotmail.com> wrote in message
> news:vgeai.19969$j63.6950@newsread2.news.pas.earthlink.net...
>> Hi,
>>
>> I want to include three php files in index.php file like the code below.
>> But it always shows up only two, any two of the three, any order.
>>
>> <tr>
>> <td><?php include ("includes/documents.php"); ?>&nbsp;</td>
>> </tr>
>> <tr>
>> <td><?php include ("includes/locations.php"); ?>&nbsp;</td>
>> </tr>
>> <tr>
>> <td><?php include ("includes/status.php"); ?>&nbsp;</td>
>> </tr>
>>
>> Can anyone help me out?
>>
>
>
> Strange... I would imagine that the order matters..
>
> replace include with echo and see if it still has the same problem...
>
> If not then replace your includes wiht simple files like
>
> i.e. document.php =>
> echo '1';
> locations.php =>
> echo '2';
> ...
>
>
>
> and see if it still does the same thing. (try to narrow down the issue...
> if if its what you have in your includes or if its the include statement
> itself)
>
> Its very strange that the order doesn't matter cause php starts from the
> top down... the first include is included first so if it doesn't get
> included some of the time then something very strange is going on or its
> some logical issue in your php files.
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация