troubleshooting Question

include_once files during ob_start callback php

Avatar of Curtis Long
Curtis LongFlag for United States of America asked on
PHPApache Web ServerMySQL Server
11 Comments1 Solution1249 ViewsLast Modified:
I am working on a php module based CMS and almost have it finished. The only thing I am missing is a way to actually include the modules in their proper places. I have a template for the pages with %1% %2% and %3% where the modules should be inserted, if there is no module for that area then it should be empty, which it is doing. If there is a module in that area then it should get the proper files from the module_bases table and include them.

Here is a screenshot to show what I am talking about.

Template layout for CMS
Now, during execution, where it says %3% it should include the files for the blog module during the ob_start callback.

Basically what I really need is this.

echo "Hello, I am a test";

echo "%1%";

function parser($buffer)
   $buffer = str_replace("%1%",contents from test.php IE include(''test.php"),$buffer);
   return $buffer;

and the final result should be Hello, I am a test

Is there any way to do this?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros