- 1). Create a web form that allows you to submit a file for validation using Notepad or an HTML editor. The form needs to have a text field for you to enter the file name, a "Browse" button that allows you to select the file from your computer, and a "Submit" button. Modify the <form> tag in the HTML so that it points to a particular PHP file that validates the file upon submission. Save your HTML file.
- 2). Create the PHP script to validate the file. Open up a new file on Notepad or your HTML editor, and create a script that stores the document into a string using the "file_get_contents" function in PHP. Validate it using the "mb_detect_encoding" function and display the character encoding by using the following code:
echo mb_detect_encoding($str, "auto");
Save your PHP file.
- 3). Upload both your web form and your PHP file on your web server.
EDITOR PICKS & Articles
- Indoor Paintball Games
- How to Stop Coming Over the Top in the Golf Swing
- Fun Math Board Games
- An Appreciation of Lynn Mctaggart, the Field and the Intention Experiment
- Lara Croft Tomb Raider Anniversary Cheats
- Groove Your Golf Swing the Easy Way - With the Medicus Driver!
- Quechua Tents: For the Camping Pro or the Beginner
- Triathlon Training For Beginners - Dispelling Popular Training Strategies
- Five Features Make Online Bingo Popular!
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
Stay With Us