Noon Swim very Sea skin-linux&php

Source: Internet
Author: User
Hi

Noon went swimming again, actually originally intended to be yesterday, behold bad weather, Monday all rain. Today is actually the same, a little rain, but swim to get a swim, better than anything

1, Php&mysql

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

Preparatory work

$con =mysqli_connect (' localhost ', ' root ', ' ', ' info ');
if ($con) {
echo "Connected successfully";
}else{
echo "Shit";
}
Mysql_close ($con);
if (mysqli_select_db ($con, ' info ')) {
echo "Database selection succeeded";
}else{
echo "Shit2";
}
/*

----Mysql_num_rows ()

Get the number of rows in the result set

$query =mysqli_query ($con, ' select * from test ');//produce result set

echo mysqli_num_rows ($query);

The usage is simple and rough, but the use is more flexible, judging/outputting

----Mysql-result

Returns the value of a field in the result set

Mysqli does not seem to complement part

Pdo,mysql,mysqli in PHP---

Php-mysql is the PHP operation MySQL Database The most primitive Extension, php-mysqli I for improvement, to mention the relative advanced function, in Extension, itself also increased security. The PDO (PHP Data Object) provides a abstraction Layer to manipulate the database

The specific difference also can not tell, go directly to search to look at the good

----Mysqli_affected_rows ($con)

Number of rows affected

Generally make judgments, for example, when inserting for the same, display as 0; feel like MySQL feedback

Starting tomorrow small practice the following

2. Linux

The virtual machine is still in trouble.

Xshell finally fix, and sure enough, the server interface CentOS is not so good, fortunately there are noble

After entering the CENTOS6, enter the user name and password, start to engage in network connectivity issues

Original URL Forget it, write it Yourself

---

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

Input I into writing mode

Change the htcp or something into a none,onboot item and change it to Yes.

Then enter the ipaddr=192.168.0.10 below

netmask=255.255.255.0

gateway=192.168.0.2

Here are a few addresses, are my own network address, query method is the Windows interface win+r, input cmd, input Ipconfig/all

Find the corresponding address, if it is wireless network, looking for wireless card, if it is wired to find wired, in short, to correspond; If you change the network, the corresponding configuration will change

If the address you found is 192.168.0.1,

Then the input in Linux becomes

192.168.0.a A is not 1.

The gateway behind is 192.168.0.b b not equal to 1, not equal to a

Then go back to Linux in the virtual machine, press ESC, enter: Wq, save exit file to write

Enter the service network restart to restart the network service

Then go to the cmd window just under Windows, enter Ping 192.168.0.10 (which I set myself, you enter your own value OK)

If it succeeds, the network connection is OK.

As for the Xshell setting, it's simple.

New connection, the host's location input 192.168.0.10, then remember to store the user name and password, connect the test on the line

The Xshell of the mind, cool Shuangshuang! Don't want to write the other, Linux play Ah ~ ~ ~

  • 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.