I want to get the contents of a particular file on a the web server, and then echo the contents into a text box on a web page. What should I use. I was thinking file_get_contents would probably be the best bet.

Recommended Answers

All 2 Replies

If all you want to do is grab the entire contents of a file and spit it into a textbox then yes, file_get_contents is probably your best bet. If you need to process it then file() or fopen/fread might be the way to go.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.