Neden, gelen iletilerin sayısını okumak için bu PHP kodu çalışmıyor?

0 Cevap php

Bu XAMPP üzerinde ama benim web sitesi (linux server) hizmet veren ana çalışır. Ben herhangi bir hata mesajları ve sadece zaman aşımına komut görmüyorum.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>Email Parser</title>
</head>

<body>
<?php

echo "Hello World";

$hostname = '{imap.gmail.com:993/imap/ssl}Inbox';
$username = 'abc@gmail.com'; //Replaced with actual user name and 
$password = 'abc';           //password in the script

$mbox = imap_open($hostname, $username, $password) or die("can't connect: " . imap_last_error());
echo "+++++ <br>";
$MC = imap_check($mbox);

echo "***** <br>";
echo $MC->Nmsgs;

?>
</body>
</html>

0 Cevap