Getting domdocument::domdocument() expects parameter 2 to be long

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

 



Hi 

All Here is my code i m getting the domdocument::domdocument() expects
parameter 2 to be long error at $doc=new DomDocument('1.0','UTF-8');    
line plz tell me some solution.

Thanks & Regards
malayappa
<?php
    

    //complete "station\sqlexpress" with your particular case
    $SERVER = ".";
       //$SERVER = "localhost";
    $ADMIN_NAME = "sa";
    //complete pass with your pass
    $ADMIN_PASS = "nanna";
    //complete database witht the name of database you whant to connect to
    $DATABASE = "Northwind";

    $Conexion = mssql_connect($SERVER, $ADMIN_NAME, $ADMIN_PASS)
        or die ("Can't connect to Microsoft SQL Server");
       if($Conexion)
	   {
         echo "database connected successfully".$Conexion."<br>";
	   }

    mssql_select_db($DATABASE, $Conexion)
        or die ("Can't connect to Database");
		echo "conneted";

	   $result=mssql_query("select *from Customers");
		echo "data selected";
     
	  echo "<pre>";
/*while ( $record = mssql_fetch_array($result) )
	{ //print_r($record);  
	   echo $record['CompanyName']."<br>";
	}
echo "</pre>"; */


$i=0;
           while ($record = mssql_fetch_array($result)){
               foreach($record as $key => $value) {
                    $resultArray[$i][$key]=$value; 
					 echo $resultArray[$i][$key]."<br>";
               }
           $i++;
           
           }

$doc=new DomDocument('1.0','UTF-8');
?>


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux