本文整理匯總了PHP中DataProvider::get_cache方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataProvider::get_cache方法的具體用法?PHP DataProvider::get_cache怎麽用?PHP DataProvider::get_cache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataProvider
的用法示例。
在下文中一共展示了DataProvider::get_cache方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DataProvider
<?php
//include (dirname(__FILE__).'/config/cronconfig.php');
include '/home/jobbid/public_html/config/cronconfig.php';
include ROOT . DS . 'library' . DS . 'dataprovider.php';
include ROOT . DS . 'library' . DS . 'sendmail.php';
$conn = new DataProvider();
$data = $conn->getEmailSpam();
if (!empty($data)) {
$mail = new sendmail();
$secSenders = $conn->get_cache('secSenders');
$lenSecSenders = count($secSenders);
$content = $conn->get10NewProject();
$arrTo = array();
foreach ($data as $e) {
array_push($arrTo, $e->email);
}
try {
$flag = true;
while ($flag) {
$rand = mt_rand(0, $lenSecSenders - 1);
$sender = $secSenders[$rand];
if ($sender == null) {
$mail->send(ADMIN_EMAIL, 'SMTP Error!!!', 'No email sender', $emailGlobal);
$flag = false;
} else {
if ($mail->send($arrTo, 'JobBid.vn - Danh Sách Công Việc Bán Thời Gian Mới!!!', $content, $sender) == false) {
unset($secSenders[$rand]);
$secSenders = array_values($secSenders);
$lenSecSenders--;
$conn->set_cache('secSenders', $secSenders);