當前位置: 首頁>>代碼示例>>PHP>>正文


PHP smail::NewProj2方法代碼示例

本文整理匯總了PHP中smail::NewProj2方法的典型用法代碼示例。如果您正苦於以下問題:PHP smail::NewProj2方法的具體用法?PHP smail::NewProj2怎麽用?PHP smail::NewProj2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在smail的用法示例。


在下文中一共展示了smail::NewProj2方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: rtrim

ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '512M');
if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) {
    $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/');
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/smail.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer.php';
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php' ); //???
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/city.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/users.php");
//------------------------------------------------------------------------------
$time_start = microtime(true);
//------------------------------------------------------------------------------
$DB->query("\n    UPDATE projects \n    SET post_date = NOW() - interval '24 hours'\n    WHERE post_date >= DATE_TRUNC('day', NOW() - interval '24 hours')\n");
$mail = new smail();
$cnt = $mail->NewProj2();
//------------------------------------------------------------------------------
$time_end = microtime(true);
$execution_time = number_format($time_end - $time_start, 5);
print_r('execution_time = ' . $execution_time . ' sec');
print_r(PHP_EOL);
print_r('sended = ' . $cnt);
print_r(PHP_EOL);
exit;
//------------------------------------------------------------------------------
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:30,代碼來源:newproj3.php

示例2: rtrim

<?php

/*
 * Скрипт рассылки о новых проектах для фрилансеров
 * Запускать раз в сутки!
 */
//ini_set('display_errors',1);
//error_reporting(E_ALL ^ E_NOTICE);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '512M');
if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) {
    //@todo: укажите вместо '' относительное положение doc_root например '/../'
    $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(dirname(__FILE__) . ''), '/');
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/log.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/multi_log.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/smail.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php";
$log = new log('hourly_newsletter_frl/' . SERVER . '-%d%m%Y[%H].log', 'w');
$log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----');
//if((int)date('H') == 1) {
$mail = new smail();
$log->TRACE($mail->NewProj2());
//}
$log->writeln('------------ END hourly    (total time: ' . $log->getTotalTime() . ') ---------------');
開發者ID:Nikitian,項目名稱:fl-ru-damp,代碼行數:27,代碼來源:hourly_newsletter_frl.php


注:本文中的smail::NewProj2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。