Home >Backend Development >PHP Tutorial >Error Undefined index , here's what's wrong

Error Undefined index , here's what's wrong

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-10-10 11:56:061910browse

Every line reports an error, I suspect it is an environmental problem, but the echo is normal. Please give me some advice on the code

Error Undefined index , here's what's wrong

Page


Error Undefined index , here's what's wrong

Reply content:

Every line reports an error, I suspect it is an environmental problem, but the echo is normal. Please give me some advice on the code



Error Undefined index , here's what's wrongPage


Error Undefined index , here's what's wrong

Because $_REQUEST is empty, those indexes are invalid. You can try changing it to this:

<code class="php">$path = isset($_REQUEST['path']) ? $_REQUEST['path'] : PATH;</code>

You can use print_r($_REQUEST); to output the elements in the $_REQUEST array;

This error is that there is no array index element in $_REQUEST.

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