Title1

Title2

Title3

1-1 過濾

  1. 引入
    //---- 過濾資料 ------------------------*/
    $myts = &MyTextSanitizer::getInstance();
    

     

  2. 字串
    #一般文字
    $row['title'] = $myts->htmlSpecialChars($row['title']);
    

     

  3. 數字
    #價格
    $row['price'] = intval($row['price']);
    

     

  4. 大量文字,編輯器
    #大量文字,編輯器
    $html = 1;
    $br = 0;
    $row['content'] = $myts->displayTarea($row['content'], $html, 1, 0, 1, $br);
    

     

  5. 大量文字,一般
    #大量文字
    $html = 0;
    $br = 1;
    $row['summary'] = $myts->displayTarea($row['summary'], $html, 1, 0, 1, $br);
    

     

  6. 日期
    #日期
    $row['date'] = intval($row['date']);
    $row['date'] = date("Y-m-d", xoops_getUserTimestamp($row['date'])); //從資料庫撈出
    

     

  7.