Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the fgetss () function in php

Shulou Source: shulou.com Published: 2022-06-03 17:08:41 11月13日 Update

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

Tags: Articles functions content characters strings files tags different interesting secure not so parameters variants most examples that is more tags users knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn Xiaomi Linux Microsoft