本文整理匯總了PHP中company::uploadInfoImage方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::uploadInfoImage方法的具體用法?PHP company::uploadInfoImage怎麽用?PHP company::uploadInfoImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類company
的用法示例。
在下文中一共展示了company::uploadInfoImage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unlink
}
if (is_file($strOldFile)) {
// 縮略圖刪除
unlink($strOldFile);
}
if (!empty($_POST['savephoto'][$num])) {
$strOldFile = $arrGPic['FileSavePath'] . 'b/' . $_POST['savephoto'][$num];
} else {
$strOldFile = '';
}
if (is_file($strOldFile)) {
// 原文件刪除
unlink($strOldFile);
}
$arrTemp = array();
$arrTemp['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $objWebInit->arrGPic['FileListPicSize'], $objWebInit->arrGPic['FileSourPicSize'], $_POST['id']);
if (!empty($_POST['photo_narrate' . $num])) {
$arrTemp['photo_narrate'] = $_POST['photo_narrate' . $num];
}
$_POST['photo'][$num] = $arrTemp;
}
}
//還原視頻數組
$_POST['video'] = array();
if (!empty($_POST['savevideo'])) {
foreach ($_POST['savevideo'] as $key => $val) {
$_POST['video'][$key] = array('video' => $val, 'videopic' => $_POST['savevideopic'][$key], 'video_narrate' => $_POST['video_narrate' . $key], 'video_title' => $_POST['video_title' . $key], 'video_time' => $_POST['video_time' . $key]);
}
}
//刪除舊視頻
if (!empty($_POST['delvideo'])) {
示例2: explode
if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
check::AlertExit("錯誤:有必填選項沒填!", -1);
}
$arrTemp = explode('|', $_POST['type_id']);
$_POST['type_id'] = $arrTemp[0];
$_POST['type_roue_id'] = $arrTemp[1];
if ($_POST['title'] != '') {
$_POST['title_md5'] = md5($_POST['title']);
}
//判斷文章信息
$arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
if ($arrTemp['COUNT_ROWS'] != 0) {
check::AlertExit("錯誤:相同的信息請不要重複發布!需要刷新排列的話,請使用列表下方“提前”選項!", -1);
}
if ($_FILES['Filedata']['name'] != "") {
$_POST['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata'], '', $_POST['FileListPicSize'], $_POST['csize0']);
}
//新圖上傳
set_time_limit(0);
foreach ($_FILES as $key => $val) {
if (strrpos($key, 'Filedata') === false) {
continue;
}
$num = substr($key, strlen('Filedata'));
if (!empty($_FILES['Filedata' . $num]['name'])) {
$arrTemp = array();
$arrTemp['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $objWebInit->arrGPic['FileListPicSize'], $objWebInit->arrGPic['FileSourPicSize']);
$arrTemp['photo_narrate'] = $_POST['photo_narrate' . $num];
$_POST['photo'][$num] = $arrTemp;
}
}