简体   繁体   English

未捕获的语法错误:脚本中的令牌无效或意外

[英]Uncaught SyntaxError: Invalid or unexpected token in script

var abc = "<?php $this->db->where('tv_schedule_status', 'Active'); $this->db->where('tv_schedule_source', 'facebook'); $this->db->order_by('tv_schedule_date', 'asc'); echo $result = $this->db->get('tv_schedule')->row()->tv_schedule_date_time; ?>";
\n

Have u try to remove your "<?php and the closure ?>" dont forget the last semicolon too... try this.. <?php echo '<script> var abc = "$this->db->where('tv_schedule_status', 'Active'); $this->db->where('tv_schedule_source', 'facebook'); $this->db->order_by('tv_schedule_date', 'asc'); echo $result = $this->db->get('tv_schedule')->row()->tv_schedule_date_time; "; </script>' ?>你有没有尝试删除你的"<?php和闭包?>"不要忘记最后一个分号......试试这个.. <?php echo '<script> var abc = "$this->db->where('tv_schedule_status', 'Active'); $this->db->where('tv_schedule_source', 'facebook'); $this->db->order_by('tv_schedule_date', 'asc'); echo $result = $this->db->get('tv_schedule')->row()->tv_schedule_date_time; "; </script>' ?> <?php echo '<script> var abc = "$this->db->where('tv_schedule_status', 'Active'); $this->db->where('tv_schedule_source', 'facebook'); $this->db->order_by('tv_schedule_date', 'asc'); echo $result = $this->db->get('tv_schedule')->row()->tv_schedule_date_time; "; </script>' ?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的SyntaxError:无效或意外的令牌 - Uncaught SyntaxError: Invalid or unexpected token 未捕获的语法错误:无效或意外的令牌(“脚本文件中包含的代码) - Uncaught SyntaxError: Invalid or unexpected token (​ code getting included in script file) 未捕获到的SyntaxError:无效或意外的令牌script.js: - Uncaught SyntaxError: Invalid or unexpected token script.js: 错误……未捕获的语法错误:无效或意外的令牌……使用 JavaScript - error… Uncaught SyntaxError: Invalid or unexpected token… with JavaScript 未捕获的SyntaxError:无效或意外的令牌弹簧启动 - Uncaught SyntaxError: Invalid or unexpected token spring boot 如何修复未捕获的语法错误:无效或意外的令牌 - how to fix Uncaught SyntaxError: Invalid or unexpected token 未捕获的语法错误:thymeleaf 模板中的令牌无效或意外 - Uncaught SyntaxError: Invalid or unexpected token in thymeleaf template 未捕获的SyntaxError:具有Scala的javascript中的无效或意外令牌 - Uncaught SyntaxError: Invalid or unexpected token in javascript with scala jQuery Uncaught SyntaxError:无效或意外的令牌 - jquery Uncaught SyntaxError: Invalid or unexpected token jQuery:未捕获的语法错误:无效或意外的令牌 - JQuery: Uncaught SyntaxError: Invalid or unexpected token
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM