n2dweb
September 7th, 2007, 08:48 PM
In php am reading a file with the following text:
__________
<p>test</p>
<?php include("include/newlyaddeditems.php");?>
<table width="100%"><tr><td height="77" align="center"><p>
<a href="new.php"><b>View All of our new items</b></a></p>
</td></tr></table>
__________
using the php code below:
__________
<?php
// file example 1: read a text file into a string with fgets
//
$filename= 'hpl.txt' ;
$output="";
$file = fopen($filename, "r");
while(!feof($file)) {
//read file line by line into variable
$output = $output . fgets($file, 4096);
}
fclose ($file);
echo $output;
__________
the echo $output gives me all the text except for the php include line.
Why? and can someone please help!:alien:
Thanks J
__________
<p>test</p>
<?php include("include/newlyaddeditems.php");?>
<table width="100%"><tr><td height="77" align="center"><p>
<a href="new.php"><b>View All of our new items</b></a></p>
</td></tr></table>
__________
using the php code below:
__________
<?php
// file example 1: read a text file into a string with fgets
//
$filename= 'hpl.txt' ;
$output="";
$file = fopen($filename, "r");
while(!feof($file)) {
//read file line by line into variable
$output = $output . fgets($file, 4096);
}
fclose ($file);
echo $output;
__________
the echo $output gives me all the text except for the php include line.
Why? and can someone please help!:alien:
Thanks J