phpns: "call to undefined function" in shownews.php

Asked by Trent36

I get the

Fatal error: Call to undefined function: htmlspecialchars_decode() in /vservers/ugprotective/htdocs/phpns/shownews.php on line 114

But for what you see is [shownews.php] not [function.php] like other suggestions

I have recently used the workaround for the login mentioned in the suggestions so it may be that I just can't use this on the server I am using but I sure would like to.

Thanks for any help.

Question information

Language:
English Edit question
Status:
Answered
For:
phpns Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
alecwh (alecwh) said :
#1

Trent,

The shownews.php file DOES NOT use /inc/function.php (for efficiency
reasons). You will need to plug this code at the top of your
shownews.php:

function htmlspecialchars_decode($str) {
    return strtr($str,
array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}

Keep in mind, once you upgrade your server to PHP5, this will caused a
"function already defined" error. You can just delete the code snippet
at that point.

Can you help with this problem?

Provide an answer of your own, or ask Trent36 for more information if necessary.

To post a message you must log in.