PriteshP23 0 Posting Whiz in Training

I am trying to read XML file and store in sql table. I got two errors.

    PHP Warning:  XMLReader::open(): Unable to open source data

    Warning: XMLReader::read(): Load Data before trying to read

// In addition, Please let me know the filename in below cases.
case 1:

Code: Select all
    $reader->open($topdir."/nap/".$code->no()."_city.xml");

//  IF i run like php user.php 01 || php user.php

case 2:
Code: Select all
    $reader->open($topdir."/nap/"."01_city.xml");

// IF i run like php user.php 01 || php user.php

I would like to know the working process.

How to solve it ?