Ec (2); $ iishostnewcom (& quot; npoint_m.host & quot;); & nbsp; load component $ r$ iishost-& gt; iisstate (10, 1, & quot; & quot;, & quot;); & nbsp; run the component function and return the echo $ r parameter; & nbsp; script ec (2); script
$ Iishost = new com ("npoint_m.host"); 'Load the component
$ R = $ iishost-> iisstate (10, 1, ""); 'Run the component function and return parameters
Echo $ r; 'response parameters
Switch the net version
Netstate (ifid, dirname, netver, iissapp, bkwebip, bkpass, webfiletype, bkport)
Parameter description: ifid as ingeter: iis website identifier
Dirname as string: directory name, for example, bbs or abcabdabe... If dirname is empty, the site is used by default.
Netver as string:. net version number
Iissapp as string: the name of the switched application pool can be left blank (only independent process pool)
. Net version number (for example, "v1.1.4322" is in c: windowsmicrosoft. netframework. net folder name)
Note: to switch to the. net version, except for the independent process pool, the application pool must be switched because. net1.1 and. net2.0. cannot coexist.
Bkwebip as string: the URL/ip address to be accessed.
Bkpass as string: controlled access password
Webfiletype as string: the file format of the controlled site, for example, asp tutorial
Bkport as integer: the port of the controlled site, for example, 999
* 1 is returned successfully. Otherwise, an error message is returned.
Next let's take a look at a php tutorial using com to connect to the adodb. connection database tutorial */
// Access execution class
Class db {
Var $ conn;
// Var $ rs_n; // record the current number of rs.
// Create a link
Function create ()
{
$ This-> conn = @ new com ("adodb. connection"); // this is 13 rows
$ Str = "driver = microsoft access driver (*. mdb); dbq =". realpath ("./dbdata/yuan555.mdb ");
$ This-> conn-> open ($ str );
// Return $ this-> $ conn;
}
// Creation Method
Function query ($ SQL)
{
$ _ Rs = @ new com ("adodb. recordset ");
$ _ Rs-> open ($ SQL, $ this-> $ conn, 1, 1 );
Return $ _ rs;
}
}
// Instantiate the class
$ Db = new db ();
$ Db-> create ();
//--------------------------------
$ Rs = $ db-> query ("select * from product ");
$ Rs-> close ();
$ Rs = null; // when close is complete, it must be null.
$ Db-> close ();