*AutoLinkの仕掛けを作るとしたら こんな感じになるんでしょうか... -- [[ぱんだ]] -html.php ... if ($is_read) { $body = preg_replace("/(?:^|(?<=>))([^<]*)/e",'autolink_replace(\'$1\')',$body); } ... -func.php function autolink_replace($str) { global $WikiName; static $pattern; if (!isset($pattern)) { $pages = get_existpages(); $arr = array(); foreach ($pages as $page) { if (!preg_match("/^$WikiName$/",$page) and strlen($page) >= 4) { $temp = '(?:'.preg_quote($page,'/').')'; $arr[$temp] = strlen($temp); } } arsort($arr,SORT_NUMERIC); $pattern = join('|',array_keys($arr)); } return preg_replace("/($pattern)/e",'make_link(\'[[$1]]\')',$str); }