With the popularity of mobile devices, the site will also usher in more and more mobile device access. Adapt to the PC's page, many times the user is not friendly to the phone, then sometimes we need to determine whether users use mobile phone access, if it is mobile phone, jump to the designated mobile phone-friendly page. Here's how to tell if a user is using a mobile phone to access it.The custom functions are as follows:$agent = Check_wap (), if ($agent) {header (' location:http://www.nowama
| android | iphone | ipod | mobi | palm | palmos | pocket | portalmmm | ppc; | smartphone | sonyericsson | sqh | spv | symbian | treo | up. browser | up. link | vodafone | windows ce | xda _)/I ', $ _ SERVER ['HTTP _ USER_AGENT']) {Return true;}Else {Return false;}}Another function is used to determine whether the PHP framework is separated from the mobile terminal: (tested, comprehensive, and recommended)Copy codeThe Code is as follows:Function is_m
Gecko) version/5.0.2 mobile/8j2 safari/6533.18.5 ', ' user-agent:mozilla/5.0 (IPod; U CPU iPhone os 4_3_3 like Mac os X; En-US) applewebkit/533.17.9 (khtml, like Gecko) version/5.0.2 mobile/8j2 safari/6533.18.5 ', ' mozilla/5.0 (IPAD; U CPU os 4_3_3 like Mac os X; En-US) applewebkit/533.17.9 (khtml, like Gecko) version/5.0.2 mobile/8j2 safari/6533.18.5 ', ' mozilla/5.0 (Linux; U Android 2.3.7; En-us; Nexus one build/frf91) applewebkit/533.1 (khtml, like Gecko) version/4.0 Mobile safari/533.1 '
1, problem descriptionThere are classes as followsclass a_class{ voidconst { ... }};In this case, what if you want to modify the member variables of the class?2, analysisIn C + +, when a class's data member is mutable , it is modified to be a const member function.3, examples are as followsTest class header file, Asa.h#ifndef asa_h #define Asa_hclass asa{public: Asa (); int Const ; Private : int mobi;}; #endif // asa_hTest
, there is the sex processing part. Checked= "Checked" indicates that the radio button has been selected, which is a part of the idea. We also have to do a edited.php page to send processing changes to the data, its function is similar to post.php. Oh, we hurry to do it, it is almost finished!edited.php File Code:
copy content to clipboard
Code:
SQL statement to execute (here is the Modify Data feature)$sql = "UPDATE ' addr_list ' SET"' Name ' = ' $name ',' Sex ' = ' $sex ','
be the most recent two years the most successful personal webmaster.
How much is your domain name worth?
Hongbo: How much does keso.cn cost?
Mr. Cai: The domain name first depends on whose. If you are a 500-strong company in the United States, then you have a minimum value of CN hundreds of thousands of. If with dot com Non-stick Big company, this domain name is related to Hongbo alone, this domain name can also value tens of thousands of block.
Ming Mingliang: I accidentally registered Ppl
, old Cai should be the most recent two years the most successful personal webmaster.
How much is your domain name worth?
Hongbo: How much does keso.cn cost?
Mr. Cai: The domain name first depends on whose. If you are a 500-strong company in the United States, then you have a minimum value of CN hundreds of thousands of. If with dot com Non-stick Big company, this domain name is related to Hongbo alone, this domain name can also value tens of thousands of block.
Ming Mingliang: I acciden
The e-book management software Calibre1.34 was released. Calibre is an open-source library management software. It has many interesting functions, including e-book conversion, e-book reader, and library e-book reader synchronization. It supports the most popular e-book formats, including: ebup, CBZ, mobi, FB2. Cross-platform support, which can run on Linux, Windows, and MACOSX systems. Recommended: Install Calibrehttp: // www. linuxid under Fedora
The
Determine the client type based on php and php determine the client type
During statistics on the number of website users, we often need to obtain the types of user browsers and operating systems. This article mainly introduces how to determine the client type based on php, if you need it, you can find out.
Method 1:
/***** Determine whether a browser belongs to a PC or a mobile terminal based on the strings specified by each browser contained in php $ _ SERVER ['HTTP _ USER_AGENT *@ author disc
I will write a small program to use php to determine whether the terminal is a mobile phone or a computer to visit the website. if you are interested, refer to the following code. I hope to help you learn php:
The code is as follows:
Function check_wap (){
If (isset ($ _ SERVER ['http _ VIA ']) return true;
If (isset ($ _ SERVER ['http _ X_NOKIA_CONNECTION_MODE ']) return true;
If (isset ($ _ SERVER ['http _ X_UP_CALLING_LINE_ID ']) return true;
If (strpos (strtoupper ($ _ SERVER ['http _ ACC
This article mainly introduces functions for detecting ip addresses and domain names in php and js, so that you can detect ip addresses and domain names in programs. For more information, see
Php ip address format detection function
The code is as follows:Function checkIp ($ ip ){$ Ip = str_replace ("", "", $ ip );$ Ip = strtolower ($ ip );$ Ip = str_replace ("http: //", "", $ ip );$ Ip = str_replace ("https: //", "", $ ip );If (preg_match ('/[A-Za-z _-]/', $ ip )){If (preg_match ('/^ ([\ w-]
PHPJSIp address and domain name format detection code. PHPIP address format detection function copy code: functioncheckIp ($ ip) {$ ipstr_replace (, $ ip); $ ipstrtolower ($ ip); $ ipstr_replace (,, $ ip); $ ip
Php ip address format detection function
The code is as follows:
Function checkIp ($ ip ){$ Ip = str_replace ("", "", $ ip );$ Ip = strtolower ($ ip );$ Ip = str_replace ("http: //", "", $ ip );$ Ip = str_replace ("https: //", "", $ ip );If (preg_match ('/[A-Za-z _-]/', $ ip )){If (pre
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.