本文整理汇总了PHP中files::Upload_ovoafile方法的典型用法代码示例。如果您正苦于以下问题:PHP files::Upload_ovoafile方法的具体用法?PHP files::Upload_ovoafile怎么用?PHP files::Upload_ovoafile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类files
的用法示例。
在下文中一共展示了files::Upload_ovoafile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
$Base->ErrorMsg('非超级管理员无法管理!');
exit;
}
switch ($action) {
case "new_ovoafile":
echo "<form style=\"margin:0px; \" action=\"upload.php?action=upload_ovoa&dizhi=" . $dizhi . "&rstform=" . $rstform . "&introduce=" . $introduce . "\" method=\"post\" enctype=\"multipart/form-data\" name=\"fileform\" id=\"fileform\">";
echo "<input name=\"attachment\" type=\"file\" style=\"width:160px;\"/>\n";
echo "<input type='submit' class=\"button\" value='上传'/> ";
break;
case "upload_ovoa":
$files = $_FILES['attachment'];
if (empty($files['name'])) {
$Base->WarnBack("请选择文件!");
exit;
}
$File->Upload_ovoafile($files, $dizhi, $rstform);
break;
case "view":
//$smarty->debugging = true;
$Admin->CheckLogin();
$sql = "SELECT * FROM `" . $db_prefix . "file` ORDER BY `file_id` DESC";
$_SESSION['session_sql'] = $sql;
$pageno = intval($_REQUEST['page']);
if ($pageno == 0 || $pageno < 0) {
$pageno = 1;
}
$recordcount = $Db->RowsAll($sql);
$pagerecord = 10;
//每页记录数
$page_num = intval($recordcount / $pagerecord);
if ($recordcount != 0 and $recordcount % $pagerecord > 0 or $recordcount == 0) {