Heim  >  Artikel  >  Backend-Entwicklung  >  错误 Undefined index , 这是哪里出了问题

错误 Undefined index , 这是哪里出了问题

WBOY
WBOYOriginal
2016-10-10 11:56:061838Durchsuche

每一行都报错,怀疑是环境问题,但是 echo 是正常的. 求指点
代码
错误 Undefined index , 这是哪里出了问题

页面
错误 Undefined index , 这是哪里出了问题

回复内容:

每一行都报错,怀疑是环境问题,但是 echo 是正常的. 求指点
代码
错误 Undefined index , 这是哪里出了问题

页面
错误 Undefined index , 这是哪里出了问题

因为$_REQUEST是空的,所以那些索引是无效的,可以改成这样试试:

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

可使用 print_r($_REQUEST); 输出$_REQUEST数组中元素;
这个错误,是$_REQUEST中没有数组索引元素。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn