输入banner图图片脚本导航/分类

php通配符实现方法

  1. $a = 'http://bbs.it-home.org/forum/viewthread.php*';
  2. $b = str_replace('*', '===x===', $a);
  3. $c = preg_quote($b);
  4. $d = str_replace('/', '\/', $c);
  5. $e = '/' . str_replace('===x===', '.+', $d) . '/is';
  6. preg_match($e, 'http://bbs.it-home.org/forum/viewthread.php?tid=12345', $m);
  7. print_r($m);
  8. ?>