Noon swimming-linux & php, noon swimming-linux_PHP tutorial

Source: Internet
Author: User
Noon swimming is very sea skin-linux & amp; php, noon swimming-linux. Swimming at noon is very sea skin-linuxphp, swimming at noon-linuxhi again to swim at noon, in fact, was originally intended to go yesterday, who knows the day is not beautiful, it is raining on Monday. The same is true today. swimming at noon is very similar-linux & php, swimming at noon-linux

Hi

I went swimming again at noon. In fact, I was planning to go there yesterday. who knows? it's raining on Monday. Today is actually the same. it's a bit light rain, but it's better to swim than anything else.

1. PHP & MySQL

----- PHP built-in MySQL function learning (3 )-----

Preparations

$ Con = mysqli_connect ('localhost', 'root', '', 'info ');
If ($ con ){
Echo "connection successful ";
} Else {
Echo "shit ";
}
// Mysql_close ($ con );
If (mysqli_select_db ($ con, 'info ')){
Echo "database selected ";
} Else {
Echo "shit2 ";
}
/*

---- Mysql_num_rows ()

Obtain the number of rows in the result set.

$ Query = mysqli_query ($ con, 'select * from test'); // Generate a result set

Echo mysqli_num_rows ($ query );

The usage is simple and rough, but the usage is flexible.

---- Mysql-result

The value of a field in the returned result set.

Mysqli does not seem to have been added.

--- PDO, mysql, and mysqli in php

PHP-MySQL is the most primitive Extension for PHP to operate MySQL databases. I of PHP-MySQLi stands for Improvement and provides more advanced functions. Extension also increases security. The PDO (PHP Data Object) provides an action Layer to operate databases.

I can't tell the specific difference. I just went to search for it.

---- Mysqli_affected_rows ($ con)

Number of affected rows

It is usually used for judgment. for example, when the inserted values are the same, the result is displayed as 0. it is similar to mysql feedback.

The following is a small practice tomorrow:

2. Linux

Virtual Machine installation is still troublesome.

Xshell is finally completed. it turns out that the centos on the server interface is not so neat, but it's nice to have a good person.

After entering centos6, enter the user name and password to Start network connection problems.

Forget the original website. write it yourself.

---

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

Enter I to enter the writing mode

Change the htcp or something to none and the onboot item to yes.

Enter IPADDR = 192.168.0.10

NETMASK = 255.255.255.0

GATEWAY = 192.168.0.2

The addresses here are all my own network addresses. the query method is windows win + r, enter cmd, and enter ipconfig/all.

Find the corresponding address. if it is a wireless network, find the wireless network adapter. if it is a wired network, find the wired network. In short, the corresponding configuration needs to be changed.

If the IP address is 192.168.0.1

In linux, the input becomes

192.168.0.a is not 1.

The following gateway is 192.168.0. B B and is not equal to.

Return to linux in the virtual machine, press esc, enter: wq, save and exit the file.

Enter service network restart to restart the network service.

Go to the cmd window in windows and enter ping 192.168.0.10 (this is set by myself. Are you sure you want to enter your own value)

If the connection is successful, the network connection is OK.

The xshell settings are simple.

Create a connection. enter 192.168.0.10 in the host location, and then remember to store the user name and password. just perform the connection test.

Xshell is easy to handle! I don't want to write anything else. linux is just getting started ~~~

Yi hi went swimming again at noon. In fact, I was planning to go there yesterday. who knows it's not good? it's raining on Monday. Today is actually the same ,...

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.