線上書籍

Home

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

<?php include_once "header.php"; include_once "up_file.php"; $op=isset($_GET['op'])?$_GET['op']:""; $sn=isset($_GET['sn'])?$_GET['sn']:""; switch($op){ case "photo": $main=get_photo($sn); break; case "file": $main=get_files($sn); break; } echo $main; function get_photo($sn=""){ $photo_file=get_pic_file('photo' , $sn , 2 ); $photo="<img src='{$photo_file}'>"; return $photo; } function get_files($sn=""){ $file=show_files('files' , $sn , ture , '' , true , true); return $file; } ?>