Jump to content

need help!!! readfile not functioning correctly


xtops

Recommended Posts

why is that i cant view the ouput of the readfile function they are in same location.

no error found...is the some missing of my code

 

 

 

<html>
<head>
<title>Tip of the day</title>
</head>

<body>
<center>

<h1>Tip of the day</h1>

<div style = "border-color:green; border-style:groove; border-width:2px">
<?
readfile("tips.txt");
?>
</div>

</center>
</body>
</html>

why is that i cant view the ouput of the readfile function they are in same location.

no error found...is the some missing of my code

 

 

 

<html>
<head>
<title>Tip of the day</title>
</head>

<body>
<center>

<h1>Tip of the day</h1>

<div style = "border-color:green; border-style:groove; border-width:2px">
<?
readfile("tips.txt");
?>
</div>

</center>
</body>
</html>

 

 

Your answer is echo , print

 

echo readfile("tips.txt");

 

 

You are not using output function to show the file contents.

 

 

 

 

I already gave you a (possible) answer in your other identical thread: http://www.phpfreaks.com/forums/index.php/topic,270512.0.html.

 

And hamza, you're wrong I'm afraid. readfile() outputs the contents of a file, and returns the number of bytes read from the file (or false in case of an error).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.