Home  >  Article  >  Backend Development  >  VB connection database flash code to connect database using PHP

VB connection database flash code to connect database using PHP

WBOY
WBOYOriginal
2016-07-29 08:44:521081browse

php code:

Copy code The code is as follows:


/* /flashservices/services/Catalog.php */
class Catalog {
    var $products_array = array();
// Constructor: Contains the list of Methods Available to the Gateway
Function Catalog () {
$ This-& GT; Methodtable = Array = & gt; & gt; "remote",
"arguments" = & gt; "" // arguments core, not tested
); // End methodtable
}
Function GetProduts () {
/
/
/
/
/ Your Code Goes Here
Return $this->products_array;
}
}


actionscript code:

Copy code The code is as follows:


#include "NetServices.as"
NetServices.setDefaultGatewayUrl("http://yourserver. com/flashservices/gateway.php");
gw = NetServices.createGatewayConnection();
CatalogREMOTE = gw.getService("Catalog", this);
CatalogREMOTE.getProducts();
getProducts_Result = function(result) {
      _root .products_results = result;
}

The above introduces the code for VB to connect to the database using PHP in Flash, including the content of VB to connect to the database. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn