本文整理汇总了PHP中smail::EmpNewProj方法的典型用法代码示例。如果您正苦于以下问题:PHP smail::EmpNewProj方法的具体用法?PHP smail::EmpNewProj怎么用?PHP smail::EmpNewProj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类smail
的用法示例。
在下文中一共展示了smail::EmpNewProj方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rtrim
$_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/');
}
$path = $_SERVER['DOCUMENT_ROOT'];
require_once $path . "/classes/config.php";
require_once $path . "/classes/smail.php";
require_once $path . "/classes/projects.php";
require_once $path . "/classes/employer.php";
//require_once($path . "/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);
$mail = new smail();
$cnt = $mail->EmpNewProj();
$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;
//------------------------------------------------------------------------------
//1010101000000000
/*
$subscr = array(
'some_index_1' => 1,
'some_index_2' => 0,
'some_index_3' => 111,
'some_index_4' => 0,
示例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';
$log = new log('hourly_newsletter_emp/' . 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->EmpNewProj());
//}
$log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------');