开发者

JavaScript doesn't work in my PHP code

开发者 https://www.devze.com 2023-01-23 20:25 出处:网络
i have this in my index.php include \'app/Core.php\'; echo Core::getPageHtml(); in Core.php final cla开发者_开发知识库ss Core

i have this in my index.php

include 'app/Core.php';     
echo Core::getPageHtml();  

in Core.php

final cla开发者_开发知识库ss Core
{
    public static function getPageHtml()
{
    ob_start();
    include 'layout.php';
    $html = ob_get_clean();
    return $html;
}
}  

layout.php is normal html code, i can see de page, just perfect, but the javascript code doesn't work, i even write an alert('hello world'), like this

   <script type="text/javscript">
     alert('hello world');
   </script>  

so, it should be simple, but i can make it work, what am i missing here? need some help with this code


"text/javscript" -> "text/javascript"


Works for me, you had text/javascript spelled wrong though.

0

精彩评论

暂无评论...
验证码 换一张
取 消