Search code examples
phpvirtual

Virtual function - including some html


I have a php-file which includes another html-file:

<? virtual("../top.html");?>

The problem is that any code before this include compiles and runs well, after - nothing. There aren't any errors etc. After commenting this line, everything works.

Code was written under local computer with ArchLinux + LAMP. Now I have ubuntu 10.04 with the same configuration.

What could it be?


Solution

  • You might try changing top.html to top.phtml and using require_once.

    <?php require_once('../top.phtml'); ?>