本文整理汇总了PHP中Images::handlePost方法的典型用法代码示例。如果您正苦于以下问题:PHP Images::handlePost方法的具体用法?PHP Images::handlePost怎么用?PHP Images::handlePost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Images
的用法示例。
在下文中一共展示了Images::handlePost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveDatabase
function saveDatabase(array $array)
{
$image = new Images();
return $image->handlePost($array);
}
示例2: ImageDetail
require_once "../model/imageDetail.model.php";
//require_once("imageDetail.control.php");
//$art->forDelData($_POST);
/*if($_POST['option']=='update' && $_POST['imgCat']){
//echo $_POST['option'].$_POST['imgCat'];
$imgd=new ImageDetail();
//$imgd->handlePost(array("option"=>"update","imgID"=>$_POST['id'],"imgCat"=>$_POST['imgCat']));
if($imgd->updateImgCat(array("imgCat"=>$_POST['imgCat']),array("imgID"=>$_POST['id']))){
unset($_POST['imgCat']);
}else{
die("更新imageDetail错误!");
}
}*/
if ($_POST['option'] == 'delete' && $_POST['hrefArray']) {
//echo $_POST['option'].$_POST['imgCat'];
foreach ($_POST['hrefArray'] as $item) {
$fileName = $realRootPath . $item;
//echo $fileName;
if (file_exists($fileName)) {
if (!unlink($fileName)) {
die("文件删除失败!");
}
} else {
die("文件不存在!");
}
}
unset($_POST['hrefArray']);
}
$img = new Images();
echo $img->handlePost($_POST);