I'm running a PHP script and continue to receive errors like: 我正在運行PHP腳本,並繼續收到以下錯誤: php
Notice: Undefined variable: my_variable_name in C:\\wamp\\www\\mypath\\index.php on line 10 注意:第10行上C:\\ wamp \\ www \\ mypath \\ index.php中的未定義變量:my_variable_name app
Notice: Undefined index: my_index C:\\wamp\\www\\mypath\\index.php on line 11 注意:未定義的索引:第11行的my_index C:\\ wamp \\ www \\ mypath \\ index.php this
Line 10 and 11 looks like this: 第10和11行看起來像這樣: spa
echo "My variable value is: " . $my_variable_name; echo "My index value is: " . $my_array["my_index"];
What is the meaning of these error messages? 這些錯誤消息是什麼意思? .net
Why do they appear all of a sudden? 爲何它們忽然出現? I used to use this script for years and I've never had any problem. 我曾經使用此腳本多年,但從未遇到任何問題。 code
How do I fix them? 我該如何解決? 索引
This is a General Reference question for people to link to as duplicate, instead of having to explain the issue over and over again. 這是一個供人們連接爲重複的通用參考問題 ,而沒必要一遍又一遍地解釋該問題。 I feel this is necessary because most real-world answers on this issue are very specific. 我認爲這是必要的,由於有關此問題的大多數實際答案都是很是具體的。 ip
Related Meta discussion: 相關元討論: ci