⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hrms_pic.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?php
 
include_once( "inc/auth.php" );
$FB_STR1 = urldecode( $PHOTO );
if ( strstr( $FB_STR1, "/" ) || strstr( $FB_STR1, "\\" ) )
{
	exit( );
}
$URL = $ATTACH_PATH."hrms_pic/{$PHOTO}";
if ( !file_exists( $URL ) )
{
	echo "找不到文件,位于服务器:".$URL;
	exit( );
}
$file_ext = strtolower( substr( $PHOTO, strrpos( $PHOTO, "." ) + 1 ) );
switch ( $file_ext )
{
case ".jpg" :
case ".bmp" :
case ".gif" :
case ".png" :
case ".wmv" :
case ".html" :
case ".htm" :
case ".wav" :
case ".mid" :
	$COTENT_TYPE = 0;
	$COTENT_TYPE_DESC = "application/octet-stream";
	break;
case ".pdf" :
	$COTENT_TYPE = 0;
	$COTENT_TYPE_DESC = "application/pdf";
	break;
case ".swf" :
	$COTENT_TYPE = 0;
	$COTENT_TYPE_DESC = "application/x-shockwave-flash";
	break;
default :
	$COTENT_TYPE = 1;
	$COTENT_TYPE_DESC = "application/octet-stream";
}
ob_end_clean( );
header( "Cache-control: private" );
header( "Content-type: {$COTENT_TYPE_DESC}" );
header( "Accept-Ranges: bytes" );
header( "Accept-Length: ".filesize( $URL ) );
if ( $COTENT_TYPE == 1 )
{
	header( "Content-Disposition: attachment; filename=".$PHOTO );
}
else
{
	header( "Content-Disposition: ; filename=".$PHOTO );
}
readfile( $URL );
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -