Problem when loading php file into variable (Load result of php code instead of the code as a string)

前端 未结 5 1693
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 03:47

I have a site architechure where I assign content to variables and then print them in a master page. My problem is that php code in the sub pages is imported into the variab

5条回答
  •  情深已故
    2020-12-04 04:33

    use can use eval function

    http://php.net/manual/en/function.eval.php

    $string = eval('?'.'>'.file_get_contents('signup_content.php',1).'<'.'?');
    echo $string;
    

提交回复
热议问题