Jump to content

PHP example does not execute PHP code ?


marsheng

Recommended Posts

That code doesn't remove anything (except leading and trailing spaces, and slashes).  It runs trim, which removes leading and trailing whitespace, stripslashes which is generally no longer needed, and htmlspecialchars which will convert certain characters to their HTML-entity equivalents so that the characters get printed on the page instead of the browser seeing them as HTML.  You can look up each of those functions in the PHP manual to see more info about them.

Link to comment
Share on other sites

No, like I said it will not remove characters other than leading and trailing spaces.  That's not what that code does, it does not remove characters.  It's only running the 3 functions (trim, stripslashes, htmlspecialchars).

http://php.net/manual/en/function.trim.php

http://php.net/manual/en/function.stripslashes.php

http://php.net/manual/en/function.htmlspecialchars.php

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...