hisoka Posted March 29, 2016 Share Posted March 29, 2016 When I tried to run this code , nothing happens and I did not see any error not even in the log error file What is the matter ? I cannot see anything <?phpini_set('display_errors', 1);error_reporting(E_ALL);$string = "<script>";echo strip_tags($string);?> Link to comment Share on other sites More sharing options...
justsomeguy Posted March 29, 2016 Share Posted March 29, 2016 What do you expect to happen when you run that? Link to comment Share on other sites More sharing options...
hisoka Posted March 30, 2016 Author Share Posted March 30, 2016 (edited) when I run that I expect to get this result : script without the HTML tags "<" and ">" I read here http://php.net/manual/en/function.strip-tags.php that strip_tags strips HTML and PHP tags from a string The problem is that no error is detected and nothing is echoed . I do not know why ? Edited March 30, 2016 by hisoka Link to comment Share on other sites More sharing options...
dsonesuk Posted March 30, 2016 Share Posted March 30, 2016 strip_TAGS, self-explanatory don't you think.:-) Before <p>strip_TAGS, self-explanatory don't you think.:-)</p> After strip_TAGS, self-explanatory don't you think.:-) 1 Link to comment Share on other sites More sharing options...
hisoka Posted March 30, 2016 Author Share Posted March 30, 2016 thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted March 30, 2016 Share Posted March 30, 2016 In other words, "<script>" is a HTML tag. Not just the brackets, the entire thing. It removes the entire thing. Link to comment Share on other sites More sharing options...
hisoka Posted March 31, 2016 Author Share Posted March 31, 2016 Thank you very much Justsomeguy . You the best man Link to comment Share on other sites More sharing options...
dsonesuk Posted March 31, 2016 Share Posted March 31, 2016 In other words TAGS such as html TAG, php TAG or even html comments, including such things as attributes, coding, depending on type of those TAGS, that make up these TAGS will be removed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now