@learner101 ;
Please learn how to wrap your scripts in PHP brackets.
In order to get your error_log file working try this:
// file "Test.php"
PHP Code:
<?php /* admin_TEST.php */
echo __FILE__;
// PREVENT ERRORS FROM SHOWING A BLANK SCREEN
/* # gradually move this line down until errors appear
require '_function_show_setup.php';
_show_setup();
*/
die;
// file: "'_function_show_setup.php"
PHP Code:
<?php /* _function_show_setup.php */
function _show_setup()
{
defined('jj') ?: define('jj','<br />'); # John's shortcut
$xx = 'background-color:#ee0; color:#900; padding:1em; border:dotted 4px #f00';
echo "<dir style='$xx'>";
echo jj,
'<b>function __get_setup()</b>', jj;
echo jj,
isset($_SESSION) ? 'SESSION ALREADY STARTED' : session_start();
echo jj,
__DIR__;
echo jj,
__FILE__;
echo jj,
error_reporting(E_ALL);
echo jj,
ini_set('display_errors',1);
echo jj,
ini_set("log_errors", 1);
echo jj,
$error_log = ini_set('error_log', dirname(__FILE__) .'\ERROR_LOG.PHP');
echo jj,
$error_log = ini_set('error_log', dirname(__FILE__) .'\ERROR_LOG.PHP');
include 'asdf.php';
$xx = 'background-color:#eee; color:#090; padding:1em; border:dotted 4px #f00';
echo "<pre style='$xx'>";
highlight_file($error_log);
echo '</pre>';
echo '</div>';
}
Bookmarks