wordpress 出现上传媒体文件 最大值是0的情况,多是php.ini 里面禁用了 ini_get 函数,
解决方式是,手动设置个值,在wp-include/media.php 里面
function wp_max_upload_size() { return 1024 * 1024 * 2 ; // phpsir 修改 最大2M $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ); $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) ); /** * Filter the maximum upload size allowed in php.ini. * * @since 2.5.0 * * @param int $size Max upload size limit in bytes. * @param int $u_bytes Maximum upload filesize in bytes. * @param int $p_bytes Maximum size of POST data in bytes. */ return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes ); }
1)帝国后台分表管理,建立phome_ecms_news_data_2表 2)insert into phome_ecms_news_data_2(id) select id from phome_ecms_news_data_1 order by id desc limit 30001,30000; //每3万条一个分表 3) update phome_ecms_news_data_2 a ,phome_ecms_news_data_1 b set a.classid=b.classid, a.keyid=b.keyid,a.dokey=b.dokey,a.newstempid=b.newstempid,a.closepl=b.closepl,a.haveaddfen=b.haveaddfen,a.infotags=b.infotags,a.writer=b.writer,a.befrom=b.befrom,a.newstext=b.newstext where a.id=b.id; // 更新 phome_ecms_news_data_2 的其它字段 4) update phome_ecms_news set stb =2 where id in (select id from phome_ecms_news_data_2); // 更新news表的stb字段 5) 要分更多表,依次类推
http://blog.chinaunix.net/uid-8747186-id-4421013.html
1)只查找
find . -type f -exec grep -HIl $’^\xEF\xBB\xBF’ {} \;
2)sed处理掉bom
find . -type f -name “*.php” -exec grep -HIl $’^\xEF\xBB\xBF’ {} \; | xargs sed -i ‘s/\xEF\xBB\xBF//’
system/sms/FW_sms.php
里面的 函数 public function sendSMS($mobile_number,$content)
{
….这里是发送短信的代码,修改这里可以改用其他通道,其他通道的sdk,请看各自的文档
}