PhpGraphy integrated by OOP

2009-02-07
2013-06-03
  • Hi folks,

    I am trying to get phpgraphy in my object oriented site. For each of the custom pages on my site i am creating a class wich extends from a defaultpage (with db functionality etc). My custom page for phpgraphy tries to change the working directory to the phpgraphy source, after wich i include index.php

    <?php

    class fotos extends DefaultPage
    {
       
        function execute()
        {
            chdir('classes/phpgraphy');
           
            ob_start();
          require_once 'index.php';
          $content = ob_get_contents() ;
          ob_end_clean();
         
          // Finally add to text
          $this->pageInfo['text'] .= $content . '</div>';
        }
       
    }

    ?>

    Now, i can't get it working! I came as far as showing the picture folders but thats all! Since i had included three folders with images, phpgraphy returns about 100 php errors in the shape of:

    PHP_WARNING: preg_match() [function.preg-match]: Empty regular expression

    Does anyone have some tips for integrating phpgraphy?