Home > php教程 > php手册 > Notice: Undefined index: page in E:PHPtest.php on line 14

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

WBOY
Release: 2016-06-06 20:35:37
Original
1827 people have browsed it

Notice: Undefined index: page in E:\PHP\test.php on line 14

治標不治本的就是將php.ini內的reporting部份修改,香港服务器租用,讓notice不顯示
error_reporting = E_ALL; display all errors, warnings and notices
改成
error_reporting = E_ERROR & ~E_NOTICE & ~E_WARNING

不然
isset($_GET["page"])做個if-else判斷!!

----修正後原始碼如下----
if(isset($_GET["page"]))$page=$_GET["page"];
else $page=1;


,香港空间,美国空间
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template