if you want to get rid of the NOTICE without via close the error_report, you must define a variable before you use it.
such as:
$fp = fopen("file.txt","r");
while (!feof($fp)) {
$output .= fread($fp,1024);
}
fclose($fp);
if your error_reporting = E_ALL and display_errors = On, you will see the NOTICE message of $output is Undefined variable. so you can use the code like:
$output = ""; //define $output
$fp = fopen("file.txt","r");
while (!feof($fp)) {
$output .= fread($fp,1024);
}
fclose($fp);
/**************************************/
if you use a form submit data, I advice you use isset to varify the $variable,such as:
if (isset($_POST['name'])) {
echo $_POST['name']
}