$. What is the post error?

Source: Internet
Author: User
$. What is the post error? $. What is the post error?

$ (Function () {$ ('# bn '). click (function () {var r = []; $ ('. xh '). each (function (I, t) {r.push((this).html () ;}); alert (r); $. post ("yidong. php ", {xh: r}) ;}); [code = php]
 
 {Foreach from = $ shop item = I} 
   {/Foreach} 
  
No. Name Category Class Image Introduction Graph Jieshao Company Start End Address Rest Network address Stop Operation Sorting
{$ I ["id"]} {$ I ["name"]} {$ I ["varietyid"]} {$ I ["classifyid"]} {$ I ["list_pic"]} {$ I ["introduction"]} {$ I ["show_pic"]} {$ I ["product_introduction"]} {$ I ["company"]} {$ I ["business_start"]} {$ I ["business_end"]} {$ I ["address"]} {$ I ["rest_flag"]} {$ I ["web"]} {$ I ["del_flag"]} Modify and delete Move up Move down Pin to top
[/Code]
Error code:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "C: \ wamp \ www \ xcx \ user \ templates \ shop. tpl & quot; on line 154 & quot; $. post ("yidong. php ", {xh: r});"-Unexpected ":", expected one of: "}" <-- thrown in C: \ wamp \ www \ xcx \ libs \ sysplugins \ smarty_internal_templatecompilerbase.php on line 154


Reply to discussion (solution)

The template compilation fails due to an error in the smarty template.
Check the code content in the template.

The template compilation fails due to an error in the smarty template.
Check the code content in the template.


The code sent is $ in the template. post ("yidong. php ", {xh: r}); this sentence has an error $. post ("yidong. php "); in this way, there will be no errors in the output, but it will not be able to achieve the effect.

Conflicts between js curly braces and smarty delimiters. This protects js code from being compiled.
{Literal}

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.