ecshop-php page Error: Preg_replace_callback () do not know how to solve?

Source: Internet
Author: User
Keywords Ecshop PHP Source Callback
Tags html comment php source code
Ecshopphp Source Callback

 my Ecshop entered the index page with an error: Warning:preg_replace_callback (): Requires argument 2, ' Array ', to is a valid callback I n C:\AppServ\www\ecshop\includes\cls_template.php on line 1152 cls_template.php source code is as follows: $pattern = Array ( '/!--[^>|\n]*? ({.+?}) [^<|{|\n]*?-->/',//replace Smarty Notes '/!--[^ <|> |{| \n]*?-->/',//replace the non-wrapped HTML comment '/(href=["|\ ']) \.\.\/(. *?) (["|\ '])/I ',//Replace relative link '/((?: background|src) \s*=\s*[" |\ ') "(?: \. \/|\.\.\/)? (images\/.*?) ["|\']) /is ',//before images plus $tmp _dir '/((?: background|background-image): \s*?url\ () (?: \. \/|\.\.\/)? (images\/)/is ',//before images plus $tmp _dir '/([\ ' |]) \.\.\//is ',//To. /the path to the beginning is all fixed to null); $replace = Array (' \1 ', ' ', ' \1\2\3 ', ' \1 '. $tmp _dir. ' \2 ', ' \1 '. $tmp _dir. ' \2 ', ' \1 '); Return Preg_replace ($pattern, $replace, $source); Return Preg_replace_callback ($pattern, $replace, $source); 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.