我收到警告:Call-time pass-by-reference has been deprecated对于以下代码行:
function XML() {
$this->parser = &xml_parser_create();
xml_parser_set_option(&$this->parser, XML_OPTION_CASE_FOLDING, false);
xml_set_object(&$this->parser, &$this);
xml_set_element_handler(&$this->parser, 'open','close');
xml_set_character_data_handler(&$this->parser, 'data');
}
function destruct() {
xml_parser_free(&$this->parser);
}
function & parse(&$data) {
$this->document = array();
$this->stack = array();
$this->parent = &$this->document;
return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL;
}
Run Code Online (Sandbox Code Playgroud)
它是什么原因以及如何解决它?
我需要在OR项目的项目中创建一个sphinx查询.但是给出一个OR条件
select cost FROM transactionsChart WHERE cost=25 OR cost=5;
Run Code Online (Sandbox Code Playgroud)
不管用.它返回一个错误
ERROR 1064 (42000): sphinxql: syntax error, unexpected OR, expecting $end near 'OR cost=5'
Run Code Online (Sandbox Code Playgroud)
有谁能够帮我....
提前致谢
我有以下脚本使用SMTP身份验证发送电子邮件。一切正常,但此邮件的收件箱中未显示日期。它标记为“?”。有谁能够帮助我?
require_once "Mail.php";
$from = "test@example";
$to = $mailto;
$subject = $subject;
$body = $msg;
$host = "test.com";
$username = "uname";
$password = "password";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject,
'Content-type'=>'text/html');
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
//echo("<p>" . $mail->getMessage() . "</p>");
return false;
} else {
//echo("<p>Message successfully sent!</p>");
return true;
}
Run Code Online (Sandbox Code Playgroud)
此处显示的from,host,username和password值仅是安全性测试值。
邮件标题有什么问题吗?