Why is the PHP error reported? The following error is reported. what does it mean? Warning: & nbsp; The & nbsp; magic & nbsp; method & nbsp ;__ get () & nbsp; must & nbsp; have & nbsp; public & nbsp; visibility & nbsp; and ask why PHP reports an error?
The following error is reported. what does it mean?
Warning: The magic method __get() must have public visibility and cannot be static in D:\xampp\htdocs\class\Page.php on line 41
Notice: A session had already been started - ignoring session_start() in D:\xampp\htdocs\index.php on line 13
Notice: Use of undefined constant g_S_name - assumed 'g_S_name' in D:\xampp\htdocs\index.php on line 14
Notice: Undefined index: g_S_name in D:\xampp\htdocs\index.php on line 14
Php
------ Solution --------------------
1 _ get can only be public and cannot be modified with the static keyword
2. the preceding error has a warning output and cannot conflict with the output data before session_start.
3 g_S_name: when the constant is output. It may be caused by not adding $.
4. undefined g_S_name index.
------ Solution --------------------
The first error is a syntax error.
The following three errors can be returned through errro_reporting (E_ALL &~ E_NOTICE); to not display.
------ Solution --------------------
Follow the rules to do everything.