2将代码包含在1行php sql中

I have a problem with the following code. How do i put 2 included files into 1 line include? I already tried it like the code below but nothing is shown (blank page). It should show the url.

  • Url: theme/default/main/index.php (it would be)
  • application-sql-realtime.php = (should show 'default' or anything else when user changing their themes template it connect to sql)

    <?php include('./theme/<?php include_once("config/application-sql-realtime.php");?>/main/index.php');?>

Refer image for code

</div>

include_one returns boolean

Maybe can be like this:

<?php
$theme = exec("php config/application-sql-realtime.php");
include("./theme/{$theme}/main/index.php");
?>

But I think you better put it in some class/function

<?php
// inside application-sql-realtime.php you declare a function to return theme name eg: getThemeName
include("config/application-sql-realtime.php");
$theme = getThemeName();
include("./theme/{$theme}/main/index.php");
?>

Make a class with a static or non static method to retrive the value you need (e.g. 'default'). Then you can implement this value in your string to include the first file. Following an example of a static method call:

<?php
$val = EgClass::getPathPart();
include('./theme/'.$val.'/main/index.php');
?>