$dirname=basename(_UPLOAD_DIR);
full_copy( _UPLOAD_DIR, $_POST['new_cp_dir']."/{$dirname}_copy" );
header("location:index.php?to=".$_POST['new_cp_dir']);
1.basename("路徑"[,"字尾"])→抓取路徑最後的那一層目錄或檔案
2.full_copy("原路徑","新路徑")→此為自訂函數,用來複製整個目錄
$dirname=basename(_UPLOAD_DIR);
rename( _UPLOAD_DIR, $_POST['new_cp_dir']."/{$dirname}" );
header("location:index.php?to=".$_POST['new_cp_dir']);
$dirname=dirname(_UPLOAD_DIR);
delTree(_UPLOAD_DIR);
header("location:index.php?to={$dirname}");
1.dirname("路徑")→抓取路徑最後的那一層目錄或檔案的所屬路徑
2.delTree("路徑")→此為自訂函數,用來刪除整個目錄
<?php
$exif = exif_read_data($_GET['file'],0,true);
include "exif_tag.php";
$main="
<table>";
foreach($exif_tag as $k=>$v) {
$main.="<tr><th>$k</th><td>$v</td></tr>";
}
$main.="</table>";
echo $main;
?>
1.$_GET['file']必須是完整路徑,exif_read_data()傳回值請存為$exif
2.exif_tag.php(可直接使用)必須在有$exif之後才能引入,否則會讀不到值。
<script src='js/jquery-1.3.2.min.js' type='text/javascript'></script>
<script type='text/javascript' src='js/coin-slider/coin-slider.min.js'></script>
<link rel='stylesheet' href='js/coin-slider/coin-slider-styles.css' type='text/css' />
<div id='coin-slider'>
<?php
$dh=opendir($_GET['dir']);
while($file=readdir($dh)){
$type=substr(strtolower($file),-3);
if($type=="jpg" or $type=="png" or $type=="gif"){
echo "<a href='{$_GET['url']}/{$file}'><img src='{$_GET['url']}/{$file}' ><span>$file</span></a>";
}
}
?>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#coin-slider').coinslider({ width: 540, height: 360, navigation: true, delay: 5000 });
});
</script>
width: 565, // 寬度
height: 290, //高度
spw: 7, // 方塊的寬
sph: 5, // 方塊的高
delay: 3000, //圖間切換時間
sDelay: 30, //方塊特效時間
opacity: 0.7, //標題透明度
titleSpeed: 500, //標題出現速度
effect: '', //圖片效果:random, swirl, rain, straight
navigation: true, //出現切換按鈕
links : true, //以圖片作為連結位址
hoverPause: true //滑鼠懸停