Home >Backend Development >PHP Tutorial >Notice: Undefined index: page in E:PHPtest.php on line 14_PHP教程

Notice: Undefined index: page in E:PHPtest.php on line 14_PHP教程

WBOY
WBOYOriginal
2016-07-21 15:33:111016browse

The only way to cure the symptoms but not the root cause is to modify the reporting part in php.ini so that the notice does not display
error_reporting = E_ALL; display all errors, warnings and notices
to
error_reporting = E_ERROR & ~E_NOTICE & ~ E_WARNING

Otherwise
isset($_GET["page"]) makes an if-else judgment!!

----The corrected source code is as follows----
if(isset($_GET["page"]))$page=$_GET["page"];
else $page=1;


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322659.htmlTechArticleThe only way to cure the symptoms but not the root cause is to modify the reporting part in php.ini so that the notice does not display error_reporting = E_ALL; display all errors, warnings and notices changed to error_reporting = E_ERROR...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn