解析错误语法错误,意外'类型'(T_STRING)

时间:2015-03-15 10:49:48

标签: xampp notepad++

我在php.17中有这个。

echo "<script type ='text/javascript'>
function delayer(){
    window.location = 'peoplelist.html'
}
</script>";   

但是,电脑回复给我'解析错误:语法错误,意外'类型'(T_STRING)第17行,有什么问题?

1 个答案:

答案 0 :(得分:0)

尝试添加一个;在JS函数的文本末尾

<?php
echo "function delayer(){ window.location = 'peoplelist.html'; }";
?>