[英]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.