本文整理匯總了PHP中Tool::alertOpenerClose方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tool::alertOpenerClose方法的具體用法?PHP Tool::alertOpenerClose怎麽用?PHP Tool::alertOpenerClose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tool
的用法示例。
在下文中一共展示了Tool::alertOpenerClose方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: FileUpload
<?php
require '../init.inc.php';
$file = new FileUpload('pic');
//$path = $file->Get_Link_Path();
if (isset($_POST['type'])) {
switch ($_POST['type']) {
case 'content':
$hight = 100;
$width = 150;
break;
case 'rotatain':
$hight = 193;
$width = 268;
}
}
$img = new Image($file->Get_Path());
$img->Thumb($width, $hight);
$img->Out();
Tool::alertOpenerClose('上傳成功', $file->Get_Link_Path());
示例2: substr
<?php
require substr(dirname(__FILE__), 0, -7) . '/init.inc.php';
if (isset($_POST['send'])) {
$_fileupload = new FileUpload('pic', $_POST['MAX_FILE_SIZE']);
$_path = $_fileupload->getPath();
$_img = new Image($_path);
$_img->thumb(100, 100);
$_img->out();
Tool::alertOpenerClose('thumbnail upload succeed', $_path);
} else {
Tool::alertBack('file too size');
}
示例3: switch
break;
case 'rotatain':
$_width = 268;
$_height = 193;
$_info = '輪播圖上傳成功!';
break;
case 'adver':
switch ($_POST['size']) {
case '690x80':
$_width = 690;
$_height = 80;
$_info = '頭部廣告690x80上傳成功!';
break;
case '270x200':
$_width = 270;
$_height = 200;
$_info = '側欄廣告270x200上傳成功!';
}
break;
default:
Tool::alertBack('警告:非法操作!');
}
$_fileupload = new FileUpload('pic', $_POST['MAX_FILE_SIZE']);
$_path = $_fileupload->getPath();
$_img = new Image($_path);
$_img->thumb($_width, $_height);
$_img->out();
Tool::alertOpenerClose($_info, $_path);
} else {
Tool::alertBack('警告:文件過大或者其他未知錯誤導致瀏覽器崩潰!');
}