$. 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]
| No. |
Name |
Category |
Class |
Image |
Introduction |
Graph |
Jieshao |
Company |
Start |
End |
Address |
Rest |
Network address |
Stop |
Operation |
Sorting |
|
|
{Foreach from = $ shop item = I}
| {$ 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 |
{/Foreach}
[/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}