我有一个编写的函数,基本上看起来像这样: function getNextCard(searchTerms) { // Setup Some Variables // Do a bunch of logic to pick the next card based on termed passed through what I'll call here as 'searchTerms' all of this logic is omitted because it's not important for my question. // ... // If we find a …
我收到此PHP错误: PHP Notice: Undefined offset: 1 这是抛出它的PHP代码: $file_handle = fopen($path."/Summary/data.txt","r"); //open text file $data = array(); // create new array map while (!feof($file_handle) ) { $line_of_text = fgets($file_handle); // read in each line $parts = array_map('trim', explode(':', $line_of_text, 2)); // separates line_of_text by ':' trim strings for extra space $data[$parts[0]] …