本文整理匯總了PHP中utils::pexit方法的典型用法代碼示例。如果您正苦於以下問題:PHP utils::pexit方法的具體用法?PHP utils::pexit怎麽用?PHP utils::pexit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類utils
的用法示例。
在下文中一共展示了utils::pexit方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: insert
public function insert()
{
$address = request::postParam('mobileaddress');
$homeInfo = request::postParam('home');
$homeAddressId = implode(',', $address);
$nowTime = time();
//獲取省市地區的名字,組合後保存到社區地址詳情裏。
$addressList = addressService::getCacheFileAddress();
$cityAddressStr = '';
foreach ($address as $aid) {
$cityAddressStr .= $addressList[$aid]['title'];
}
$homeData = array('title' => $homeInfo['title'], 'address_ids' => $homeAddressId, 'mobileaddress' => $cityAddressStr . $homeInfo['mobileaddress'], 'lng' => $homeInfo['lng'], 'lat' => $homeInfo['lat'], 'firstchar' => $homeInfo['firstchar'], 'image' => $homeInfo['image'], 'paddtime' => $nowTime);
$homeModel = homeService::getSelfModel(homeService::$modelName);
//判斷是否添加了該社區。
$hasHomeInfo = homeService::getHomeInfoByTitle($homeData['title']);
if (!$hasHomeInfo) {
$homeId = $homeModel->insert($homeData);
//保存對應地址信息
homeAddressService::getSelfModel(homeAddressService::$modelName);
foreach ($address as $aid) {
$addressData = array('address_id' => $aid, 'home_id' => $homeId);
homeAddressService::$model->insert($addressData);
}
} else {
utils::pexit('已有該社區');
}
}
示例2: main
public function main()
{
$this->actionMenu = array(array('name' => '更新菜單緩存', 'url' => utils::getUrl('admin/menu/clear-menu-cache')));
$this->menuTitle = '係統信息';
utils::pexit($_SERVER);
$this->setView();
}
示例3: getHomeListByShopPoint
public function getHomeListByShopPoint($point, $square = 0.5)
{
$pointInfo = utils::getSquarePoint($point['lat'], $point['lng'], $square);
$homeParam = array('where' => "lat<>0 and lat>? and lat<? and lng>? and lng<?", 'param' => array($pointInfo['rightBottom']['lat'], $pointInfo['leftTop']['lat'], $pointInfo['leftTop']['lng'], $pointInfo['rightBottom']['lng']));
$homeList = $this->model->select($homeParam);
utils::pexit($homeList);
}