PHP study notes: COM application

xiaoxiao2021-03-06  92

AdoDB application:

open ("provider = microsoft.jet.Oledb.4.0; data source = d: /usr/www/html/data.mdb") ; // access // $ conn-> open ("provider = sqloledb; data source = localhost; initial catalog = database; user id = user; password = password :)"; // sql $ = $ conn-> execute ("SELECT * from SPZS");

$ Num_Columns = $ r-> fields-> count (); echo $ number_columns. "/ N record
"; for ($ I = 0; $ i <$ NUM_COLUMNS; $ I ) {$ FLD [$ I ] = $ r-> Fields ($ i);} $ rowcount = 0; while (! $ r r>) {for ($ I = 0; $ i <$ num_columns; $ i ) {Echo $ FLD [$ . i] -> value "/ t"; /// t is the TAB key} echo "

"; $ rowcount ; // rowcount increments $ rs-> MoveNext ();} $ rs-> Close (); $ conn-> close ();

$ RS-> Release (); $ conn-> release ();

$ RS = NULL; $ conn = null;?>

Call the Word object:

Visible = 1; // Place it before $ Word-> Documents-> Add (); // Open a new document

// Casually do something $ Word-> Selection-> Typetext ("this is a test"); $ Word-> Documents [1] -> Saves ("useless test.doc"); $ word-> quit () ; // Close Word // Release Object $ Word-> Release (); $ Word = NULL;?>

转载请注明原文地址:https://www.9cbs.com/read-96077.html

New Post(0)