線上書籍

Home

[1012]PHP進階開發及TadTools工具應用

<?php function contact_qrcode_show($options){ if(preg_match("/contact\/index.php\?sn=/i" , $_SERVER['REQUEST_URI'])){ $url=str_replace("index.php","pda.php" , $_SERVER['REQUEST_URI']); }elseif(preg_match("/contact\/$/i" , $_SERVER['REQUEST_URI'])){ $url=$_SERVER['REQUEST_URI']."pda.php"; }else{ return ; } //$url=$_SERVER['REQUEST_URI']; $block=""; if(file_exists(TADTOOLS_PATH."/qrcode.php")){ include_once TADTOOLS_PATH."/qrcode.php"; $qrcode= new qrcode(); $block=$qrcode->render($url); } return $block; } ?>