How to use the fgetss () function in php
Editor to share with you how to use the fgetss () function in php, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
An interesting variant of fgets () is fgetss (), which has the following syntax:
String fgetss (resource fp, int length, string [allowble_tags])
1. Fgetss is similar to fgets (similar, except that it removes any PHP and HTML tags found in the string.
2. If you want to keep any specific tags, you can add them to the allowable_tags string.
For security reasons, you can use fgetss () when reading files written by others or files containing user input.
Example