Kyrislian Posted January 29, 2008 Share Posted January 29, 2008 Hi there. I've been wanting to learn php, and I've gone and gotten myself a couple books on the subject. I'm working through the examples shown, but there's this one bit that completely baffles me. It's a very simple piece of code, so I'm getting pretty frustrated with it. Here's the 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> I would really, really appreciate any help. Quote Link to comment https://forums.phpfreaks.com/topic/88427-confused-over-readfile/ Share on other sites More sharing options...
effigy Posted January 29, 2008 Share Posted January 29, 2008 So... what's the problem exactly? If the code is being shown, you don't have short_open_tag enabled. Try <?php. Quote Link to comment https://forums.phpfreaks.com/topic/88427-confused-over-readfile/#findComment-452555 Share on other sites More sharing options...
Kyrislian Posted January 29, 2008 Author Share Posted January 29, 2008 Thanks for your reply. The problem was that the tips file wasn't printed out. But... it was a facepalm moment. The reason it didn't show was that it was in HTML and not php. Sorry for taking up your time. Quote Link to comment https://forums.phpfreaks.com/topic/88427-confused-over-readfile/#findComment-452564 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.