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

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

 



  Thank u for response

On Mon, Mar 3, 2008 at 9:54 AM, malayappa2000 <malayappa@xxxxxxxxxxxxxxxxxx>
wrote:

>   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');
> ?>
>
>  
>



-- 
Regards
P.M.M.Srinivas
jr Software Engineer
ID: NGH32053
Ph : +91 9849426596
Home page : www.nannacomputers.com
An ISO 9001:2000 company


[Non-text portions of this message have been removed]


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

  Powered by Linux