本文整理汇总了PHP中CommonFunctions::allowSendmailPathEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonFunctions::allowSendmailPathEdit方法的具体用法?PHP CommonFunctions::allowSendmailPathEdit怎么用?PHP CommonFunctions::allowSendmailPathEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonFunctions
的用法示例。
在下文中一共展示了CommonFunctions::allowSendmailPathEdit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reWriteConf
/**
* Write email configuration.
*
* @param bool $force - Force write - disregarding config - only use when copying default configuration!
* @return int
*/
public function reWriteConf($force = false)
{
$sysConf = new sysConf();
$sendMailPath = $this->originalSendmailPath;
/*
* Only override sendmail path if allowed.
*/
if ($force || CommonFunctions::allowSendmailPathEdit()) {
$sendMailPath = $this->getSendmailPath();
}
$content = '
<?php
$this->smtpHost = \'' . $this->_safeEscape($this->getSmtpHost()) . '\';
$this->smtpUser = \'' . $this->_safeEscape($this->getSmtpUser()) . '\';
$this->smtpPass = \'' . $this->_safeEscape($this->getSmtpPass()) . '\';
$this->smtpPort = \'' . $this->_safeEscape($this->getSmtpPort()) . '\';
$this->sendmailPath = \'' . $this->_safeEscape($sendMailPath) . '\';
$this->mailType = \'' . $this->_safeEscape($this->getMailType()) . '\';
$this->mailAddress = \'' . $this->_safeEscape($this->getMailAddress()) . '\';
$this->smtpAuth = \'' . $this->_safeEscape($this->getSmtpAuth()) . '\';
$this->smtpSecurity = \'' . $this->_safeEscape($this->getSmtpSecurity()) . '\';
?>';
return file_put_contents($this->configurationFile, $content);
}