未定义的变量,在真实服务器中的wamp失败

时间:2016-06-12 13:03:00

标签: php server wamp

    function readDatabase($filename) 
    {
        // read the XML database of aminoacids
        $data = implode("", file($filename));
        $parser = xml_parser_create();
        xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
        xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
        xml_parse_into_struct($parser, $data, $values, $tags);
        xml_parser_free($parser);

        // loop through the structures
        foreach ($tags as $key=>$val) {
            if ($key == "movie") {
                $movranges = $val;
                // each contiguous pair of array entries are the 
                // lower and upper range for each movie definition
                for ($i=0; $i < count($movranges); $i+=2) {
                    $offset = $movranges[$i] + 1;
                    $len = $movranges[$i + 1] - $offset;
                    $tdb[] = parseMov(array_slice($values, $offset, $len));
                }
            } else {
                continue;
            }
        }
        return $tdb;// <----------------- on xampp works perfectly
                    // on real server 
                    // it returns undefined variable ;(
    }
  

块引用       //返回$ tdb的问题       //未定义的变量,甚至不是错误....只是一个通知       //但仍然无法在服务器上工作       //当运行true xampp时,它完美运行

0 个答案:

没有答案