function SetLanguage($langcode = 'en', $lang_path = 'language/') {
//Define full set of translatable strings
$PHPMAILER_LANG = array(
'provide_address' => 'You must provide at least one recipient email address.',
'mailer_not_supported' => ' mailer is not supported.',
'execute' => 'Could not execute: ',
'instantiate' => 'Could not instantiate mail function.',
'authenticate' => 'SMTP Error: Could not authenticate.',
'from_failed' => 'The following From address failed: ',
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
'data_not_accepted' => 'SMTP Error: Data not accepted.',
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
'file_access' => 'Could not access file: ',
'file_open' => 'File Error: Could not open file: ',
'encoding' => 'Unknown encoding: ',
'signing' => 'Signing Error: ',
'smtp_error' => 'SMTP server error: ',
'empty_message' => 'Message body empty',
'invalid_address' => 'Invalid address',
'variable_set' => 'Cannot set or reset variable: '
);
//Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"!
$l = true;
if ($langcode != 'en') { //There is no English translation file
$l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';
}
$this->language = $PHPMAILER_LANG;
return ($l == true); //Returns false if language not found
}这个是phpmailer中的一个方法,,,
我的问题是:怎么把phpmailer里SetLanguage里的$PHPMAILER_LANG数组里的内容,在浏览器运行有发邮件功能php文件时,在浏览器里不显示$PHPMAILER_LANG数组里的内容啊。(前提:发送的邮件格式不正确)急啊,,请大师指教
//Define full set of translatable strings
$PHPMAILER_LANG = array(
'provide_address' => 'You must provide at least one recipient email address.',
'mailer_not_supported' => ' mailer is not supported.',
'execute' => 'Could not execute: ',
'instantiate' => 'Could not instantiate mail function.',
'authenticate' => 'SMTP Error: Could not authenticate.',
'from_failed' => 'The following From address failed: ',
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
'data_not_accepted' => 'SMTP Error: Data not accepted.',
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
'file_access' => 'Could not access file: ',
'file_open' => 'File Error: Could not open file: ',
'encoding' => 'Unknown encoding: ',
'signing' => 'Signing Error: ',
'smtp_error' => 'SMTP server error: ',
'empty_message' => 'Message body empty',
'invalid_address' => 'Invalid address',
'variable_set' => 'Cannot set or reset variable: '
);
//Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"!
$l = true;
if ($langcode != 'en') { //There is no English translation file
$l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';
}
$this->language = $PHPMAILER_LANG;
return ($l == true); //Returns false if language not found
}这个是phpmailer中的一个方法,,,
我的问题是:怎么把phpmailer里SetLanguage里的$PHPMAILER_LANG数组里的内容,在浏览器运行有发邮件功能php文件时,在浏览器里不显示$PHPMAILER_LANG数组里的内容啊。(前提:发送的邮件格式不正确)急啊,,请大师指教
解决方案 »
- 建网站ASP/PHP不精通,用工具一样建成功!
- 速求个PHP ajax做的博客系统~
- 如何使表格单边框,而且细细的。
- Is it possible to exclude specified GET parameters in apache access logs?(by W7
- varchar与blob有什么不同处
- 赶紧找个php的工作
- PHP视频会议系统
- 文件无法显示?
- 将收到的POST数据,写入文本 要求用telnet来请求
- apigility-能基于kohana框架么?(在线等)
- 添加表单中的option成功后,在IE中的查看源代码看不到option的选项吗?
- php中的socket_write能不能直接发送16进制的数据
http://127.0.0.1/cbmail/thanks.php如果thanks.php里写的邮件地址格式不正确的话,访问http://127.0.0.1/cbmail/thanks.php这个地址的网页会出现SetLanguage方法里的$PHPMAILER_LANG数组里的一些内容。比如,You must provide at least one recipient email address.这句话。
并且SetLanguage方法是phpmailer文件夹里的class.phpmailer.php类里的一个方法
如何修改class.phpmailer.php类,使得访问http://127.0.0.1/cbmail/thanks.php这个地址的网页不会出现SetLanguage方法里的$PHPMAILER_LANG数组里的一些内容。比如,You must provide at least one recipient email address.这句话。不知道有没有表达清楚嗯,,,希望大家帮忙啊