[Development] 01. database authorization and connection, 01 database authorization. [Development] 01. database authorization and connection. 01 database authorization builds A WeiPHP framework application (called A) on Sina SAEs. it implements A wall function and wants to use A previous [development] 01. database authorization and connection, 01 database authorization
A WeiPHP framework application (called A) is built on Sina SAEs. it implements A wall function and wants to display the Wall content through A front-end web page, rather than through the WeiPHP framework. In this case, you need to authorize the database of the WeiPHP framework application to the web site application (called B ).
1. database authorization (1) go to database management and click cross-application authorization
(2) authorize application A's database to application B and click authorize
2. Compile the database connection script for application B (1) modify the file index. php.
(2) parameter description: master database domain name: SAE_MYSQL_HOST_M
Slave Database domain name: SAE_MYSQL_HOST_S
Port: SAE_MYSQL_PORT username: SAE_MYSQL_USER (Access Key)
Password: SAE_MYSQL_PASS (Secret Key)
Database name: SAE_MYSQL_DB
3. view the result:
Webpage display:
Helloworld
4. Note
If SAE_MYSQL_USER and SAE_MYSQL_PASS are incorrect, the following information is displayed:
Warning: mysql_connect () [function. mysql-connect]: this app is not authorised in index. php on line 6
Author: Jackson Source: Huang Zhe blog http://www.cnblogs.com/jackson0714/p/4376000.html
Middleware built A WeiPHP framework application (called A) on Sina SAEs and implemented A wall function. I want to use A front...