ravindranadh Posted March 24, 2007 Share Posted March 24, 2007 well i just started to use php...and while i did established the data base connection succesfully.... but when i was tryin to go through the pages , some of the pages are been displaying as Fatal error: Class 'xsltprocessor' not found in C:\wamp\www\dvdmania.com\view_category.php on line 119with out displaying the content of the page.... can u please suggest me about that ... thnx in advance.. Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/ Share on other sites More sharing options...
DanDaBeginner Posted March 24, 2007 Share Posted March 24, 2007 your using class, right? have you included the class in your pages? Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214091 Share on other sites More sharing options...
ravindranadh Posted March 24, 2007 Author Share Posted March 24, 2007 well i think so.. but i m not sure, can u tell how to check that.. Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214093 Share on other sites More sharing options...
DanDaBeginner Posted March 24, 2007 Share Posted March 24, 2007 can u post your code here? plz summarize it, no need to post all the codes.. Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214095 Share on other sites More sharing options...
ravindranadh Posted March 24, 2007 Author Share Posted March 24, 2007 code of the php page that is throwin the error... $xml_data.="</cp788ecommerce>"; //die ($xml_data); //Create new XML DOM document $xml = new DomDocument; //Load XML from the string $xml->loadXML($xml_data) or die ("Unable to load XML string"); //Create new XSL DOM document $xsl = new DomDocument; $xsl->load('xml/products.xsl'); //Configure the transformer $proc = new xsltprocessor; $proc->importStyleSheet($xsl); // attach the xsl rules print $proc->transformToXML($xml); // actual transformation //*** END Process xsl stylesheet and XML document together ?> <!-- END PHP PART --> Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214099 Share on other sites More sharing options...
DanDaBeginner Posted March 24, 2007 Share Posted March 24, 2007 where the page that contain a class name 'xsltprocessor'? it should be included to your site.. have you seen a code at the top of your page like this require_once()? or class xsltprocessor { content here: } Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214100 Share on other sites More sharing options...
ravindranadh Posted March 24, 2007 Author Share Posted March 24, 2007 yeah it had the code include_once this is the whole php code... <?php include_once "include/user_header.php"; //include config file which contains DB vars needed for mysql connection include_once "include/config.php"; //connect to database $conn = mysql_connect($HOST,$USER,$PASS) or die("Unable to connect as $USER to $DB"); mysql_select_db($DB,$conn) or die ("Unable to select $DB database"); $result = mysql_query("SELECT a.*,b.name category_name FROM Products a,categories b where a.category_id=b.id and a.category_id=".$_GET[id]) or die("Unable to execute query"); $rcount = mysql_num_rows($result); if($rcount < 1) die("The are no products in this category"); $xml_data.= "<?xml version=\"1.0\" ?>\n"; //create the root element $xml_data.= "<cp788ecommerce>\n"; //Loop for each row in the result set //Fetch data in the associative array with key=>value e.g. artist=>Madonna while($row = mysql_fetch_assoc( $result) ){ $xml_data.=" <products>\n"; //Loop for each array element foreach($row as $key=>$val) $xml_data.= "\t<$key>$val</$key>\n"; $xml_data.=" </products>\n"; }//End of while $xml_data.="</cp788ecommerce>"; //die ($xml_data); //Create new XML DOM document $xml = new DomDocument; //Load XML from the string $xml->loadXML($xml_data) or die ("Unable to load XML string"); //Create new XSL DOM document $xsl = new DomDocument; $xsl->load('xml/products.xsl'); //Configure the transformer $proc = new xsltprocessor; $proc->importStyleSheet($xsl); // attach the xsl rules print $proc->transformToXML($xml); // actual transformation //*** END Process xsl stylesheet and XML document together ?> <!-- END PHP PART --> thnx for u r help ... Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214101 Share on other sites More sharing options...
ravindranadh Posted March 24, 2007 Author Share Posted March 24, 2007 Link to comment https://forums.phpfreaks.com/topic/44094-hi-can-u-pls-help-me-out-in-this/#findComment-214461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.