Search code examples
phphtmleclipsecodeignitereclipse-pdt

SCRIPT tag in Header of View causes view to fail?


I'm trying to load a bare-bones view (I've gutted the content to try and resolve the issue) and I've discovered that the problem that seems to be causing the view to fail (in Eclipse PDT, anyway) is the <script.../> tag in the header -

View file with the script tag -

enter image description here

And the result -

enter image description here

WITHOUT the <script.../> tag -

enter image description here

And the result (It's hard to see the text against the background so I zoomed WAAAY in) -

enter image description here

The debug output in both cases displays the view HTML as it should appear, but only with the script tag omitted is the HTML body properly rendered.

Why does the body not render with the tag present? I've checked the location of the referenced folder and it's in the same directory as the index.php file - am I not referencing the location properly? Is it possible the file is borked somehow and that is what's causing it?


Solution

  • Perhaps the problem is with your self-closing script tag. Your code should work with the regular <script></script> tags.

    For more, see Why don't self-closing script tags work?