Reason:
php5.5 later preg_replace no longer supports the E-mode modifier, which can be replaced with the Preg_replace_callback function.
Workaround:
Locate the file Smarty_Compiler.class.php line No. 270:
/* replace special blocks by "{php}" */$source_content= preg_replace($search.'e'"'".$this->_quote_replace($this->.'php'."' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'".$this->_quote_replace($this->right_delimiter) ."'" $source_content);
To be replaced by:
// 解决:preg_replace(): The /e modifier is deprecated, use preg_replace_callback ins$source_content= preg_replace_callback($search, create_function ('$matches'"return '".$this->_quote_replace($this->.'php'."' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'".$this->_quote_replace($this->right_delimiter) ."';") $source_content);
Reprinted from: http://www.epooll.com/archives/791/
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the use of Smarty template 2x injection variable error, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.