Jump to content

Deprecated Function? encodeHTML


spikypunker

Recommended Posts

Hi Guys, loving the new look!

 

I've got this developable software which i've bought and am trying to intergrate into my site but have encountered a problem. The company is based in Oz so the tech support replies come in the middle of the night and they werent very helpful, pretty much just told me what the error was so looks like i'm on my own in this one.

 

It's saying there's a deprecated function, so i'm guessing the code was written for an out of date PHP version?

 

Here's the error:

 

Deprecated: Function ereg_replace() is deprecated in /home/fotravel/htdocs/brandit/editor/editor/default.php on line 39 Deprecated: Function ereg_replace() is deprecated in /home/fotravel/htdocs/brandit/editor/editor/default.php on line 40 Deprecated: Function ereg_replace() is deprecated in /home/fotravel/htdocs/brandit/editor/editor/default.php on line 41

 

 

And here's the function i belive is in question:

 

 function encodeHTML($sHTML)
    {
    $sHTML=ereg_replace("&","&",$sHTML);
    $sHTML=ereg_replace("<","<",$sHTML);
    $sHTML=ereg_replace(">",">",$sHTML);
    return $sHTML;
    }

  echo encodeHTML(file_get_contents($file));

 

Could anyone suggest what to replace this function with?

 

 

Cheers! Peace Chris

Link to comment
https://forums.phpfreaks.com/topic/194880-deprecated-function-encodehtml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.