Solution to ecshop errors in PHP of High version

Source: Internet
Author: User
: This article mainly introduces how to report errors to ecshop in PHP of the high version. if you are interested in the PHP Tutorial, refer to it. 1. when ecshop prompts Strict Standards: Non-static method cls_image

: Gd_version () shocould not be called statically inE: \ wwwroot \ weirenchou \ mongodes \ lib_base.php on line 346

Find row 346.

return cls_image::gd_version()
Replace:

$p = new cls_image();return $p->gd_version();


2. The following error occurs during ecshop: Deprecated: preg_replace (): The/e modifier is deprecated, use preg_replace_callback instead in \ ecshop \ shortdes \ cls_template.php on line 300.


Open the directory of ecshop and find lines 3 to 300th of the program des \ cls_template.php.

Set

Return preg_replace ("/{([^ \} \ {\ n] *)}/e", "\ $ this-> select ('\ 1 ');", $ source ); Replace

return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source);

3. Strict Standards: Only variables shocould be passed by reference in E: \ web \ shopex \ shortdes \ cls_template.php on line 422

$tag_sel = array_shift(explode(' ', $tag));

Changed:

$tag_arr = explode(' ', $tag);  $tag_sel = array_shift($tag_arr);



Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The preceding section describes the solution to errors reported by ecshop in PHP of the high version, including related content. I hope that some friends who are interested in the PHP Tutorial can help me.

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.