本文整理汇总了PHP中admin::getDocumentRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::getDocumentRoot方法的具体用法?PHP admin::getDocumentRoot怎么用?PHP admin::getDocumentRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::getDocumentRoot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: files
function files()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS;
$this->chid = $HTTP_GET_VARS["chid"];
$this->name = $HTTP_GET_VARS["name"];
$this->names = $HTTP_GET_VARS["names"];
$this->from = $HTTP_GET_VARS["from"];
$this->to = $HTTP_POST_VARS["to"];
$this->dir = preg_replace("'(\\/\\.\\.)+|(\\.\\.\\/)+|(\\.\\.)+|/\$'is", "", urldecode($HTTP_GET_VARS["dir"]));
$this->global_dir = admin::getDocumentRoot() . $this->root . $this->dir;
}
示例2: print_copy_link
function print_copy_link($path, $name)
{
global $server_path, $HTTP_SERVER_VARS;
$imgsize = GetImageSize(urldecode($path));
$width = $imgsize[0];
$height = $imgsize[1];
$path = ereg_replace("/+", "/", $path);
$path = ereg_replace(admin::getDocumentRoot(), "", $path);
//$name=ereg_replace("\....$","",$name); // remove the extension in the name
//$name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
$str .= "<a href=\"#\" onClick=\"top.document.frmLinkPick.LinkUrl.value='{$path}'; return false;\">{$name}</a>";
return $str;
}
示例3: print_copy_link
function print_copy_link($path, $name)
{
global $server_path, $HTTP_SERVER_VARS;
$imgsize = GetImageSize(urldecode($path));
$width = $imgsize[0];
$height = $imgsize[1];
$path = ereg_replace("/+", "/", $path);
$path = ereg_replace(admin::getDocumentRoot(), "http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . "", $path);
//$name=ereg_replace("\....$","",$name); // remove the extension in the name
//$name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
$str .= "<a href=\"#\" onClick=\"top.document.forms[0].elements['ImgUrl'].value='{$path}';";
$str .= "top.document.forms[0].elements['ImgWidth'].value={$width};";
$str .= "top.document.forms[0].elements['ImgHeight'].value={$height};";
$str .= "top.document.PREVIEWPIC.src='{$path}'; return false;\">{$name}</a>";
return $str;
}
示例4: template
function template($name, &$ref)
{
$file = admin::getDocumentRoot() . "/adm/templates/" . trim($name) . ".php";
if (file_exists($file)) {
ob_start();
include $file;
$template = ob_get_contents();
ob_end_clean();
} else {
$template = $admin_config["show_warnings"] ? addslashes(page::showWarnings("<b>" . trim($name) . ".php</b> - Template is missing!")) : "";
}
return $template;
}