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> Link to comment https://forums.phpfreaks.com/topic/175475-need-help-readfile-not-functioning-correctly/ 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? Link to comment https://forums.phpfreaks.com/topic/175475-need-help-readfile-not-functioning-correctly/#findComment-924647 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. Link to comment https://forums.phpfreaks.com/topic/175475-need-help-readfile-not-functioning-correctly/#findComment-924844 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). Link to comment https://forums.phpfreaks.com/topic/175475-need-help-readfile-not-functioning-correctly/#findComment-924853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.