There is a header.php file and it contains some php codes that return HTML. I know I can use require, include to echo the results, but what I want to do is to store its processed output string into a variable.
Bir sayfada, ben kullanılan:
$headerHTML=file_get_contents('header.php');
Then I got the PHP code output rather than the processed HTML output. I know adding http:// would help. But I prefer to keep using relative path, how can I tell the function to treat the php file correctly?
Not: Ben oldukça ob_start() mümkünse kullanmaktan daha bu ifadeyi file_get_contents kullanmaya devam etmek istiyorum.