Home > Article > Backend Development > javascript 里头放PHP 代码
javascript 里面放PHP 代码
if(strpos($_SERVER["HTTP_USER_AGENT"],"MSIE")){
?>
<script><br />
$(document).ready(function() { <br />
$('.speakkerSmall').speakker({<br />
file: '<?php echo base_url('list/file/'. $recInfo['file'] . '/' . $recInfo['licno'] . '/' . session_id()); ?>',<br />
title: 'one single MP3',<br />
theme: 'light',<br />
poster: 'cover.jpg'<br />
});<br />
</script>
-----------------------------------
上面这一段:
file: '',
怎么改?