What does $this generally mean in PHP?
Posted
by
xczzhh
on Stack Overflow
See other posts from Stack Overflow
or by xczzhh
Published on 2011-02-07T15:10:47Z
Indexed on
2011/02/07
15:25 UTC
Read the original article
Hit count: 188
I am really new to PHP, so I am kind of confused seeing these different operators all day. Here is some code I came across when watching a video tutorail, I'd appreciate it if some could explain a little bit:
function index()
{
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' =>'password',
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Jerry');
$this->email->to('[email protected]');
$this->email->subject('this is an email test');
$this->email->message('this is test message!');
if($this->email->send())
{
echo 'Your email was sent';
}
else
{
show_error($this->email->print_debugger());
}
}
...
© Stack Overflow or respective owner