我搜索了很多,但找不到任何解决方案.在我的代码更改几个小时后,我尝试从php.net的例子,它的行为相同.
如果我把它发送到我的Gmail地址一切都很好看,如果我把它发送到另一台服务器,它不会将其作为HTML呈现.我尝试了大约8台服务器,其中4台遇到了这个问题
这是代码(php示例):
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . …Run Code Online (Sandbox Code Playgroud) 我正在寻找一个库来解析OCaml中的HTML文件.基本上相当于Jsoup/Beautiful Soup.主要要求是能够使用CSS选择器查询DOM.形式的东西
page.fetch("http://www.url.com")
page.find("#tag")
Run Code Online (Sandbox Code Playgroud) 我正在尝试在执行find()查询时设置QUERYOPTION_NOTIMEOUT标志.该标志将覆盖MongoCursor上的默认10分钟超时.
根据Documentation find()应该返回一个DBCursor:
DBCursor cursor = collection.find(query);
Run Code Online (Sandbox Code Playgroud)
然后我就能做到
cursor.addOption(Bytes.QUERYOPTION_NOTIMEOUT);
Run Code Online (Sandbox Code Playgroud)
但是find()实际上返回了没有addOption()方法的FindIterableImpl /.
这是上下文的整个方法:
public static MongoCursor getSomethingFromDB(String something) {
MongoCollection collection = getCollectionForClass(BlogPost.class);
return collection.find(and(exists("a", false), eq("other", something))).iterator();
}
Run Code Online (Sandbox Code Playgroud)