摘要:
1 require_once WEB_PATH . '/lib/PHPExcel/PHPExcel.php'; 2 require_once WEB_PATH . '/lib/PHPExcel/PHPExcel/IOFactory.php'; 3 4 class ExcelExport{ 5 public static function export($orderList){ 6 $columnArr = array('A'=>20, 'B'=>20, 'C'=>'auto', & 阅读全文
摘要:
介绍几个我用到的php正则表达式1. 一篇文章的链接,我需要去掉以 /hotels/打头的链接,可用下面正则$content = preg_replace('/(.*?)/is', '\\4', $content);2. 一篇文章的链接,我需要把 /attractions/aaa/bbb.html 替换为 /attractions/bbb.html,可用下面正则$content = preg_replace('/href="\/attractions\/([^\/]+)\/(.*?)\.html"/is', 'href 阅读全文