Include problem with ignored PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PHPstarter
    New Member
    • Jun 2009
    • 77

    Include problem with ignored PHP

    Hi guys. Not sure what I should have called this problem, but anyways, here is my problem:

    I have BB code such as [mid]3[/mid].

    This should replace this BB Code with a Module, loading content with ID 3.

    However, the module 'shell' is a seperate file, so when I try to replace [mid]3[/mid] with a file include, all the PHP code inside the module shell is appearing as regular text, making the Module useless.

    Are there any ways to solve this?

    My code now is:
    Code:
    $mf = ExtractString($content, '[mid]', '[/mid]');
    $open = fopen($AP_mv3, "r");
    $read = fread($open, filesize($AP_mv3));
    
    $content = 
    str_replace("[mid]".$mf."[/mid]", 
    "<div id='moduleCenter'>".$read."</div>", 
    $content);
    $AP_mv3 is the module ID list (seperate php file)
    $AP_mv3 is the module shell (also seperate php file)
Working...