/*asdasfasfas*/fasd/*/ asdkjhasdjkhasd /*asdasfasfasfasd/*/ error_reporting (E_ALL ^ E_NOTICE); //Å×½ºÆ® ÆÄÀÏ $if=fopen("ht.php","r"); $word=fread($fp,filesize("ht.php")); fclose($fp); //emphasis("php",$word); echo $word; function emphasis($lang,&$str){ if($fp=@fopen("$lang.emp","r")){ return false; } //°¢ÇÔ¼ö¿¡ ¾Ë¸Â´Â °Ë»ö ÆÐÅÏÀ» ¹Þ¾Æ¿É´Ï´Ù $tmp=getLanguagePattern($lang); //ÆÐÅÏÀ¸·Î ¸¸µì´Ï´Ù $pt="($tmp[esc])|($tmp[qu1])|($tmp[qu2])|($tmp[lcm])|($tmp[cm])|($tmp[word])"; $str=preg_replace_callback("/$pt/i","emphasisreword",$str); } function emphasisreword($in){ if($in[1]){return $in[0];} if($in[2]){ $class="ht_escape_color";} if($in[3]){ $class="ht_quotation_color";} if($in[4]){ $class="ht_quotation_color";} if($in[5]){ $class="ht_comment_color";} if($in[6]){ $class="ht_comment_color";} return "$in[0]"; } function getLanguagePattern($lang){ $rt= array( "esc"=>"\\\\\.", "qu1"=>"\"[^\"]*\"", "qu2"=>"\'[^\']*\'", "lcm"=>"\/\/.*", "cm"=>"\/\*[^\/\*]*\*\/", "word"=>"[A-Za-z_]+", ); return $rt; }