:::

8-3 上課範例:ajax2.php

<?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;
}

?>

:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D26%26tbdsn%3D773

書籍目錄

展開 | 闔起

線上使用者

32人線上 (4人在瀏覽線上書籍)

會員: 0

訪客: 32

更多…