0542デフォルトの名無しさん (ワッチョイ cb65-ipLS)
2018/08/22(水) 11:35:44.27ID:XDj/gPFz0$line = preg_replace_callback(
'!<a href="\.\./test/read\.php/(?<bbs>[^/]+)/(?<key>[^/]+)/(?<num>[\d|\-]+)" target="_blank">>>\k<num></a>!',
function ($matches) use ($del) {
$bbs = filter_input(INPUT_POST, 'bbs');
$key = filter_input(INPUT_POST, 'key');
if ($matches['bbs'] !== $bbs || $matches['key'] !== $key) {
return $matches[0];
}
return '<a href="../test/read.php/'.$bbs.'/'.$key.'/'.res_num($matches['num'], $del).'" target="_blank">>>'.res_num($matches['num'], $del).'</a>';
},
$line
);