帝国附件设置为绝对路径,以后的图片上传自动设置为绝对路径。
但是设置绝对路径前的图片路径需要批量替换;
帝国自带批量设置路径不好使用,根本就没有使用成功过;
于是,个人写的mysql语句如下:
update phome_ecms_news set newstext=REPLACE (newstext,'/d/file/','http://www.xxxx.com/d/file/')
返回:
ERROR 1054 (42S22): Unknown column 'newstext' in 'field list'
分析:
帝国cms的newstext字段在默认在附表中,不在主表中
使用如下语句:
update phome_ecms_news_data_1 set newstext=REPLACE (newstext,'/d/file/','http://www.xxxx.com/d/file/')
返回:
Query OK, 0 rows affected (0.07 sec)
Rows matched: 4597 Changed: 0 Warnings: 0
成功