Not to worry, This s because of domxml library. If your are using PHP4 the in php.ini uncomment extension=php_domxml.dll. and If your using PHP 5 then comment extension=php_domxml.dll. Have Fun… Harshad Pandit, PHP-Pandit
Category Archives: PHP
PHP Change encoding from “file_get_contents”
$requestAddress = “your XML url”; $xml_str = file_get_contents($requestAddress,0); $xml_str = mb_convert_encoding($xml_str, ‘UTF-8’, “iso-8859-7”); //mb_convert_encoding(‘The URL’, ‘The URL Encoding’, ‘Your encoding’)
Display correctly Greek characters at subject of an email
You can use this function when the subject at an email is not displayed correctly. The idea is to base64_encode the subject header. Something like
Ajax – dynamic content with link history
Use this script to update content dynamicaly. Original source from http://www.unfocus.com/projects/historykeeper/
Clean Word HTML using Regular Expressions
function cleanHTML($html) { /// /// Removes all FONT and SPAN tags, and all Class and Style attributes. /// Designed to get rid of non-standard Microsoft Word HTML tags. /// // start by completely removing all unwanted tags $html = ereg_replace(“<(/)?(font|span|del|ins)[^>]*>”,””,$html); // then run another pass over the html (twice), removing unwanted attributes $html = ereg_replace(“<([^>]*)(class|lang|style|size|face)=(\”[^\”]*\”|'[^’]*’|[^>]+)([^>]*)>”,”<\\1>”,$html); …
Continue reading “Clean Word HTML using Regular Expressions”
Using Comments in PHP
HTML Code: <!– This is an HTML Comment –>