本文整理汇总了PHP中Tags::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Tags::__construct方法的具体用法?PHP Tags::__construct怎么用?PHP Tags::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tags
的用法示例。
在下文中一共展示了Tags::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FileUpload
function __construct($UploadDirectory=''){
parent::__construct();
$this->objFileUpload = new FileUpload();
$this->directory=$UploadDirectory;
$this->modified=time();
$this->uploaded=time();
$this->mail_obj = new PHPMailer();
}
示例2: ClsJSFormValidation
function __construct()
{
parent::__construct();
$this->contact_id = $_REQUEST['contact_id'];
$this->Validity = new ClsJSFormValidation();
$this->timearray[weekendday] = 5;
///////////////////////////////////////////////FOR TODAY and TOMMOROW////////////////////////////////////
$this->timearray[today] = time();
$this->timearray[tomorrow] = time() + 1 * 24 * 60 * 60;
$N = date("N", time());
if ($N < $this->timearray[weekendday]) {
$this->timearray[daytoAdd] = $this->timearray[weekendday] - $N;
} else {
if ($N == $this->timearray[weekendday]) {
$this->timearray[daytoAdd] = 0;
} else {
$this->timearray[daytoAdd] = 12 - $N;
}
}
//////////////////////////////////////////////FOR THIS WEEK and NEXT WEEk/////////////////////////////////
$this->timearray[thisweek] = time() + $this->timearray[daytoAdd] * 24 * 60 * 60;
$this->timearray[nextweek] = time() + ($this->timearray[daytoAdd] + 7) * 24 * 60 * 60;
//////////////////////////////////////////////FOR THIS MONTH and NEXT MONTH///////////////////////////////
$td1 = date("t", time());
$pd1 = date("d", time());
$rd1 = $td1 - $pd1;
//echo "this month=".$rd1;
$this->timearray[thismonth] = time() + $rd1 * 24 * 60 * 60;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
$rd2 = $rd1 + date("t", mktime(0, 0, 0, date("m") + 1, date("d"), date("Y")));
//echo "next month=".$rd2;
$this->timearray[nextmonth] = time() + $rd2 * 24 * 60 * 60;
//////////////////////////////////////////////FOR LATER THIS YEAR/////////////////////////////////////////////
$td3 = 364 + date("L", time());
$pd3 = date("z", time());
$rd3 = $td3 - $pd3;
//echo "later this year=".$rd3;
$this->timearray[laterthisyear] = time() + $rd3 * 24 * 60 * 60;
//////////////////////for the next year////////////////////////////
$td4 = 364 + date("L", mktime(0, 0, 0, date("m"), date("d"), date("Y") + 1));
$pd4 = date("z", time());
$rd4 = $td4 - $pd4;
$rd4 += $td4;
//echo "OUTPUT=".$rd4;
$this->timearray[nextyear] = time() + $rd4 * 24 * 60 * 60;
}