There is a line that I am trying to output to htmlencoded in a way, and the function always returns an empty line. htmlentities()
I know exactly why he does it. Well, I do not run PHP 5.4. I have the latest PHP 5.3 installed.
The question is, how can I htmlencode a string that has the wrong sequence of code blocks.
According to the manual, ENT_SUBSTITUTEthis is the way. But this constant is not defined in PHP 5.3.X.
I have done this:
if (!defined('ENT_SUBSTITUTE')) {
define('ENT_SUBSTITUTE', 8);
}
still no luck. htmlentitiesstill returns an empty string.
I wanted to try ENT_DISALLOWEDinstead, but I cannot find its corresponding long value for it.
So my question is two folded
What is the constant value of PHP 5.4 ENT_DISALLOWED?
, , UTF-8 ( ), ? - , , htmlentities() .