我在dataconfig_1.xml中有以下内容
<?xml version="1.0" encoding="UTF-8"?>
<dataConfig>
<dataSource batchSize="-1" convertType="true" driver="com.mysql.jdbc.Driver" password="solrpw" url="jdbc:mysql://127.0.0.1/solrDB" user="solruser"/>
<document name="items">
<entity name="root" pk="id" preImportDeleteQuery="data_source:1" query="select a.id, a.body, a.headline title ,a.date datecreated, a.title_id ,t.name publisher_name from article as a inner join title as t on t.id=a.title_id" transformer="TemplateTransformer" deltaImportQuery="select a.id, a.body, a.headline title ,a.date datecreated, a.title_id ,t.name publisher_name from article as a inner join title as t on t.id=a.title_id where last_update_time > '${dataimporter.last_index_time}'" deltaQuery="select id from article where last_update_time > '${dataimporter.last_index_time}'">
<field column="data_source" template="1"/>
<field column="data_source_type" template="Jdbc"/>
<field column="data_source_name" template="syndigate_solr"/ … 我有语言的cookie.我想检查是否设置了此cookie并检查其值以将用户重定向到特定页面.cookie名称为Lang,其值可能为En,Fr或Ar
if (req.http.Cookie ~ "Lang"){
//now i want to check for the cookie value
//if LANG=="Ar"
// set req.url = req.url "CookieValue"
}
有谁知道如何检查清漆中的cookie值?
谢谢
有没有办法从您的PHP代码发送即时消息到正式的消息服务,如Yahoo Messenger,Skype或MSN messenger?
我有php脚本在mysql DB中插入文章.mysql中的字段类型是文本.
现在,当我插入一个大于32K的文章时,它只被截断为32K.我所知道的是mysql中文本的最大大小是64K.
PS.:mysql版本是5.0.51a-24 + lenny5
PHP版本是:PHP 5.3.2-1ubuntu4.9
mysql:max_allowed_packet = 16M
任何想法为什么mysql截断它或如何解决它?
**编辑**
我的字符集是utf8,
通过选择该字段的十六进制我得到65768,并且如您所知,每两个十六进制数字代表一个字节,因此这里的实际大小是65768/2 = 32884
mysql> select length(hex(body)), length(body) from articles where article_id=62727; +-------------------+--------------+ | length(hex(body)) | length(body) | +-------------------+--------------+ | 65768 | 32884 | +-------------------+--------------+
谢谢你的帮助