Re: [PHP] Error in initialising XML parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PHO won't automatically include a class file by default. You either need to manually include it with a require, include it or require_once line, or use an automagical include script. As it stands, you're getting the error because php doesn't know where your class is.

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Sridhar Pandurangiah" <sridharpandu@xxxxxxxxx>
Date: Mon, Sep 6, 2010 09:12
Subject: [PHP] Error in initialising XML parser
To: <php-general@xxxxxxxxxxxxx>

Hi

I am writing a PHP snippet to display invoices that is generated by 
another computer application. The use case is as follows

1. The other computer application generates the invoices for the month 
in XML and puts it in a common dirctory. So at anytime there could be 
multiple files. Each file contains several invoices. These invoices are 
for different vendors.
2. My PHP snippet will list all the files in the directory. I have got 
this part right after a lot of research, phew! It displays only xml 
files and keeps out the others like files begining with "." (dot) etc. 
This is listed as a series of checkboxes so that the user can view the 
list of invoices available. Once the user clicks on the checkboxes I 
POST the file name to the server with the following code

$BillLocation = "/home/cmi/Integration/xml_files";
$StyleSheet = "Bill.xsl";
$DirHandle = opendir($BillLocation);

if ($_POST['_submit_check'])
{
	$MyBill = new Displaybill($_POST[BillChosen]);
	$MyBill->parse($_POST[BillChosen]);
	$MyBill->Show_Bill($MemberId, $StyleSheet);
}
{
	$result = List_Directory($DirHandle);
	
}

I get a following error Fatal error: Class 'Displaybill' not found in 
/home/sridhar/Sastra/2010-ClubMan-Integration/ListAvailableBills.php on 
line 15

I have the "Displaybill" class in the same location as the other file 
still PHP is not able to locate it. What could be wrong? Any help would 
be appreciated.

Running the whole thing on localhost with the vhosts configured to teh 
above directory.

Best regards

Sridhar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux