本文整理匯總了PHP中IO::getFileUri方法的典型用法代碼示例。如果您正苦於以下問題:PHP IO::getFileUri方法的具體用法?PHP IO::getFileUri怎麽用?PHP IO::getFileUri使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IO
的用法示例。
在下文中一共展示了IO::getFileUri方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dzzdecode
padding-top: 0;
color: #999;
background-color: #333333;
}
</style>
<!-- flowplayer javascript component -->
<script type="text/javascript" src="dzz/player/mp4/flowplayer/flowplayer-3.2.12.min.js"></script>
</head>
<body><?php
$path = dzzdecode($_GET['path']);
$patharr = explode(':', $path);
if ($patharr[0] == 'ftp') {
$src = $_G['siteurl'] . DZZSCRIPT . '?mod=io&op=getStream&path=' . rawurldecode($_GET['path']);
} else {
$src = IO::getFileUri($path);
$src = str_replace('-internal.aliyuncs.com', '.aliyuncs.com', $src);
}
?>
<a href="<?php
echo $src;
?>
" style="height:100%;width:100%;postion:absolute;left:0;top:0;overflow:hidden" id="player"> </a>
<!-- this will install flowplayer inside previous A- tag. -->
<script>
//flowplayer("player", "flowplayer-3.2.16.swf");
flowplayer("player",
{
// our Flash component
src: "./dzz/player/mp4/flowplayer/flowplayer-3.2.16.swf",
wmode: 'transparent'
示例2: exit
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
if (!defined('IN_DZZ')) {
exit('Access Denied');
}
$path = dzzdecode($_GET['path']);
$patharr = explode(':', $path);
if ($patharr[0] == 'ftp') {
$stream = $_G['siteurl'] . DZZSCRIPT . '?mod=io&op=getStream&path=' . rawurldecode($_GET['path']);
} else {
$stream = IO::getFileUri($path);
$stream = str_replace('-internal.aliyuncs.com', '.aliyuncs.com', $stream);
}
//轉向地址按您的office web app 要求改寫;
header("location: http://view.officeapps.live.com/op/view.aspx?src=" . urlencode($stream));
示例3: getFileUri
public function getFileUri($path, $fop)
{
global $_G;
if (strpos($path, 'attach::') === 0) {
$attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
$bz = io_remote::getBzByRemoteid($attach['remote']);
if ($bz == 'dzz') {
return $_G['siteurl'] . $_G['setting']['attachurl'] . $attach['attachment'];
} else {
return IO::getFileUri($bz . '/' . $attach['attachment'], $fop);
}
return IO::getFileUri($path);
} elseif (strpos($path, 'dzz::') === 0) {
return $_G['siteurl'] . $_G['setting']['attachurl'] . preg_replace("/^dzz::/", '', $path);
} elseif (is_numeric($path)) {
$icoarr = C::t('icos')->fetch_by_icoid($path);
$bz = io_remote::getBzByRemoteid($icoarr['remote']);
if ($bz == 'dzz') {
if ($icoarr['type'] == 'video' || $icoarr['type'] == 'dzzdoc' || $icoarr['type'] == 'link') {
return $icoarr['url'];
}
return $_G['siteurl'] . $_G['setting']['attachurl'] . $icoarr['attachment'];
} else {
return IO::getFileUri($bz . '/' . $icoarr['attachment'], $fop);
}
}
return '';
}
示例4: getAttachUrl
function getAttachUrl($attach, $absolute = false)
{
global $_G;
$attachment = '';
$bz = io_remote::getBzByRemoteid($attach['remote']);
if ($bz == 'dzz') {
if ($absolute) {
$attachment = $_G['setting']['attachdir'] . './' . $attach['attachment'];
} else {
$attachment = $_G['siteurl'] . $_G['setting']['attachurl'] . $attach['attachment'];
}
return $attachment;
} elseif (strpos($bz, 'FTP') === 0) {
return $_G['siteurl'] . DZZSCRIPT . '?mod=io&op=getStream&path=' . dzzencode($bz . '/' . $attach['attachment']);
} else {
return IO::getFileUri($bz . '/' . $attach['attachment']);
}
}