SAE Study Notes-1

Source: Internet
Author: User

Introduction: This is the detailed page of SAE Study Notes-1. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 344746 'rolling = 'no'>

I have a preliminary understanding of PHP and I think it is enough. Go to sae directly.

For me, simply learning grammar and functions doesn't mean anything at all. I don't have any pressure. I just want to learn PHP for my own interests. Instead, let's go straight to the question and do something that I'm interested in.

SAE

I have to say that I think Sae is a second payment system. It has always been an illusion for me to play online games... I don't want to mention this. Anyway, I don't think Sae is intended to be open to free users for a long time. It is estimated that no cloud beans will be available after beta. Now I can use one day for it, in the future, you will not worry about things.

However, for a newbie, Sae is doing quite well. SAE comes with a PHP + MySQL environment, and the best is that there is an online editor that can directlyCodeEditing. This is an artifact for beginners to learn PHP.

Think about it. In a PHP + MySQL environment, you can directly modify the PHP file code and bring your own dual-line server. And most importantly, it is free! At the beginning, I should not set up an environment locally. I could just go to sae to learn PHP. If someone wants to learn PHP in the future, I strongly recommend using SAE directly.

However, I still want to say that there are few documents provided by Sae... Maybe I am a newbie. It took me half an hour to find the method for accessing MySQL, and it was found in the sample code. This is depressing.

Access MySql in SAE

Sample Code:

 
$ Con = mysql_connect (sae_mysql_host_m. ':'. sae_mysql_port, sae_mysql_user, sae_mysql_pass );

Username: sae_mysql_user

Password: sae_mysql_pass

Master database Domain Name: sae_mysql_host_m

Slave database Domain Name: sae_mysql_host_s

Port: sae_mysql_port

Database Name: sae_mysql_db

Note: The create datebase operation cannot be performed in SAE.

In the MySQL database of SAE, only one database can be operated. The name is app _ (your application name)

My test code:

(Access the database and create a data table named persons)

 
<? PHP $ con = mysql_connect (sae_mysql_host_m. ':'. sae_mysql_port, sae_mysql_user, sae_mysql_pass);?> <? Phpmysql_select_db ("app _ ***", $ con); $ SQL = "CREATE TABLE persons (firstname varchar (15), lastname varchar (15), age INT )"; mysql_query ($ SQL, $ con);?>

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/344746.html pageno: 4.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.