note 120098 added to function.fgetss

From: Date: Sat, 29 Oct 2016 08:12:11 +0000
Subject: note 120098 added to function.fgetss
Groups: php.notes 
Request: Send a blank email to php-notes+get-206982@lists.php.net to get a copy of this message
The documentation doesn't specify how to use $allowable_tags. It's a string of tags in HTML format, including the angle brackets. <?php $fh = fopen('somefile.txt', 'r'); $line = fgetss($fh, 1024, '<b><img>'); ?> This will strip all tags within the retrieved text EXCEPT <b> and <img>, keeping both opening and closing tags. All attributes within the $allowable_tags are kept; you don't need to specify them too. Partial tags are never included, even if they're in $allowable_tags, i.e. the closing angle bracket must be present to be recognised. ---- Server IP: 72.52.91.14 Probable Submitter: 49.177.154.6 ---- Manual Page -- http://php.net/manual/en/function.fgetss.php Edit -- https://master.php.net/note/edit/120098 Del: integrated -- https://master.php.net/note/delete/120098/integrated Del: useless -- https://master.php.net/note/delete/120098/useless Del: bad code -- https://master.php.net/note/delete/120098/bad+code Del: spam -- https://master.php.net/note/delete/120098/spam Del: non-english -- https://master.php.net/note/delete/120098/non-english Del: in docs -- https://master.php.net/note/delete/120098/in+docs Del: other reasons-- https://master.php.net/note/delete/120098 Reject -- https://master.php.net/note/reject/120098 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206982) next »