xtops Posted September 25, 2009 Share Posted September 25, 2009 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> Quote Link to comment Share on other sites More sharing options...
trq Posted September 25, 2009 Share Posted September 25, 2009 Did you actually read the topic of this forum? Quote Link to comment Share on other sites More sharing options...
hamza Posted September 25, 2009 Share Posted September 25, 2009 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. Quote Link to comment Share on other sites More sharing options...
thebadbad Posted September 25, 2009 Share Posted September 25, 2009 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.