Ecshop-php page error: preg_replace_callback () does not know how to solve it?

Source: Internet
Author: User
Tags html comment
When my ecshop enters the index page, it always reports the following error: Warning: preg_replace_callback (): Requiresargument2, & #39; Array & #39;, tobeavalidcallbackinC: callback source code: $ patternarray (& #39; & #39;, replace the smarty annotation & # ecshopphp source code callback

When my ecshop enters the index page, it always reports the following error: Warning: preg_replace_callback (): Requires argument 2, 'array', to be a valid callback in C: \ AppServ \ www \ ecshop \ shortdes \ cls_template.php on line 1152 cls_template.php source code: $ pattern = array ('/
   /', // Replace the smarty comment '/
   /', // Replace the html comment without line breaks'/(href = ["| \ ']) \. \. \/(. *?) (["| \ '])/I', // replace the relative link '/((? : Background | src) \ s * = \ s * ["| \ ']) (? : \. \/| \.\.\/)? (Images \/.*? ["| \ '])/Is', // add $ tmp_dir '/((? : Background | background-image): \ s *? Url \()(? : \. \/| \.\.\/)? (Images \/)/is ', // add $ tmp_dir'/([\ '| "]) \ before images. \. \ // is ', // .. all paths starting with/are corrected as 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.