Jump to content


This topic is now archived and is closed to further replies.


Do some script coding for website?

Recommended Posts

Hi there,
I want to have a page, like for example, that it gets from the MySQL database, if it's like for example, "#include layouts/default/enterpage.php;". I want it to read that it needs to include a page, and include this page. I know that I can do that by searching for all #include then look after the include and etc. but you know, is there any better way?

Share this post

Link to post
Share on other sites
Nvm, solved here is what I use:
$in = "#include";
if($pos = strpos($content, $in)){
$pos = strpos($content, $in);
$content = substr($content, 0, $pos) . "" . substr($content, $pos+strlen($in));
include(trim(substr($content, $pos, strpos($content, ";") - 1)));
$content = ReplaceOne(substr($content, $pos, strpos($content, ";")), "", $content);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.