Is it possible to do like
$var = require_once('lol.php');
so that any HTML output that lol.php does will go inside $var?
I know about output buffering, but is there some special built-in function that already does this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
$var = require_once('lol.php');will only put the return value of the file into$var. If you don’t return anything from it, it’ll just benull.If you want the output you will need to use output buffering: