Re: Running PHP 4.3 under WIN 2000 IIS with MSSQL Server.

From: Date: Thu, 23 Jan 2003 11:50:12 +0000
Subject: Re: Running PHP 4.3 under WIN 2000 IIS with MSSQL Server.
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18043@lists.php.net to get a copy of this message
At 02:49 23/01/2003 +0000, you wrote:
luki@thenewline.com (Lukasz Karapuda) wrote: Hello. I am in the process of migrating from a Win2000+ASP+MSSQL Server 2000 web environment to a Win2000+PHP+MSSQL Server environment. 1. Session Handling. yes 2. MSSQL Server access / ODBC access to MySQL server. yes. There are performance problems with access to remote MSSQL servers (see e.g. http://bugs.php.net/bug.php?id=21772). Why do you want to access mysql over ODBC? The native API is much more powerful... 3. E-mail sending functionality. Yes 4. DOM XML parser. don't know much about this. Have a look at www.php.net/domxml
This (DOM XML) works just as expected (though get the *latest* version of PHP you can find to ensure most of the bugs have been worked out) DOM implementations are requireds to provide certain standardised functionality though the syntax might be language specific the actual results from a gived piece of code should not : Heres an example chunk I've worked on this week :
if      ($xmldoc=xmldoc($fields->data)) {
// Get some XML data from the database : $fields is a retrieved recordset object
// If statement ensures the xmldoc could be read and parsed if xmldoc() returns true)
        $context=xpath_new_context($xmldoc);
// Set up your context (document) reference for XPth to work with
        $root=$xmldoc->root();
// This is my document root (obviously !)
        $nodepath="/scenes";
// OK - top level node called scenes - this is an XPath expression
        $result=xpath_eval($context,$nodepath);
// Evaluate the Xpath against the document specified above
        $scenes=$result->nodeset[0];
// This is your nodeset - its an array of objects (nodes)
        print(domxml_get_attribute($scenes,"description"));
// Get an attribute
        print($scenes->content);
// Get the text of a node } else {
        print("Error : Document was not valid XML");
} So this would parse out the following description attribute from this document : <scenes description="my scene description">
        Act one scene one
</scenes> and print My scene description Act one scene one Cheers, Neil Smith

« previous php.windows (#18043) next »