JavaScript benim PHP kodu çalışmıyor

0 Cevap

benim index.php bu var

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

in Core.php

final class Core
{
    public static function getPageHtml()
{
    ob_start();
    include 'layout.php';
    $html = ob_get_clean();
    return $html;
}
}  

layout.php Normal html kodu, bu böyle, ben sadece mükemmel de sayfasını görebilirsiniz, ancak javascript kod çalışmaz, ben bile bir uyarı ('merhaba dünya') yazmak

   <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

0 Cevap