is an example of php. after reading it, you will know how unreliable it is.
1. function is_wap (){
2. $ ua = strtolower ($ _ SERVER ['http _ USER_AGENT ']);
3. $ uachar = "/(nokia | sony | ericsson | mot | samsung | sgh | lg | sie | philips | panasonic | alcatel | lenovo | cldc | midp | wap | mobile) /I ";
4. if ($ ua = ''| preg_match ($ uachar, $ ua ))! Strpos (strtolower ($ _ SERVER ['request _ URI ']), 'wap ')){
5. return true;
6.} else {
7. retu
. Determine whether it is mobile or PC-side
* * To determine if the current user is the PC or the phone end returns true for the phone side false for the PC side * @return Boolean *//** * Whether the Mobile Access access * * @return bool */function IsMobile () {///If there is http_x_wap_profile, it must be the mobile device if (Isset ($_server[' http_x_wap_profile ')) return true; If the VIA information contains WAP, it must be a mobile device, some service associations block the information
function IsMobile ()
{
If you have http_x_wap_profile, it must be a mobile device.
if (Isset ($_server[' http_x_wap_profile '))
{
return true;
}
If the VIA message contains a WAP, it must be a mobile device, and some service providers block that information
if (Isset ($_server[' Http_via '))
{
Not found for flase, otherwise true
Return Stristr ($_server[' Http_via '), "WAP")? True:false;
}
Brain residue method, determine the mobile phone to send the client logo, compatibility needs to be improve
Bloggers here for everyone to share the PHP judgment of two instances, one is the PHP judgment is the mobile phone or PC side, and the second is PHP to determine whether the browser, for your reference, the specific content as follows
1, to determine whether the mobile phone side
function IsMobile () {///If there is http_x_wap_profile, it must be a mobile device if (Isset ($_server[' http_x_wap_profile ')) {return true; }//If the VIA information contains WAP it must be a mobile device, some ser
Amp; lt ;? PhpfunctionisMobile () {if HTTP_X_WAP_PROFILE is available, it must be a mobile device if (isset ($ _ SERVER [HTTP_X_WAP_PROFILE]) {returntrue;} if the via information contains wap, it must be a mobile device, some service providers block this information if (is... function isMobile ()
{
// If HTTP_X_WAP_PROFILE exists, it must be a mobile device.
If (isset ($ _ SERVER ['http _ X_WAP_PROFILE '])
{
Return true;
}
// If the via information contains wap, it must be a mobile device. some
mobile phones; blackBerry 10 also uses HTML and JavaScript as the core of its next-generation app strategy. In addition, Windows 8 and Windows 8 introduce new HTML and JavaScript development modes to develop the "Windows 8 style" app. Some of these platforms will certainly succeed in 2013. I like Chrome OS and Tizen most.
Chrome OS is backed by Google, which re-modifies the developer and consumer promotion methods and has the widest platform strategy advantage (cross-mobile and desktop platform
PHP/** * To determine whether to access the phone and jump * User: Liang Tianjing * DATE:2015/7/13 * time:16:02*//** * Verify phone-side access * @return BOOL*/functionMobilebrowser () {//If you have http_x_wap_profile, it must be a mobile device . if(isset($_server[' Http_x_wap_profile ']))return true; //if the VIA message contains a WAP, it must be a mobile device, and some service providers block that information if(isset($_server[' Http_via '])) { //not found for flase, otherwis
Requirements: Mobile phone tablet access to the site, jump to the WAP page of the mobile phone, computer access to the website, jump to PC PC page.There are several kinds of solutions, roughly divided into two categories, one is implemented on the server, and the other is through the page JS implementation. But can be implemented on the server, try not to implement on the page. Search from the Internet for a few code first labeled below.Method One: Nginx according to Http_user_agent judgment, in
'])) { return true; } //if the VIA message contains a WAP, it must be a mobile device, and some service providers block that information if(isset($_server[' Http_via '])) { //not found for flase, otherwise true return Stristr($_server[' Http_via '], "WAP")?true:false; } //brain Residue method, determine the mobile phone to send the client logo, compatibility needs to be improved if(isset($_server[' Http_user_agent '])) { $clientkeywords=Array(' N
Use of JList
JList compared to Jcheckbox, you can select a maximum of one item, and JList can be selected as a whole column .
The third constructor cannot change the number of items
--Construct a simple listImportJava.awt.Container;Importjava.awt.GridLayout;ImportJava.awt.event.WindowAdapter;Importjava.awt.event.WindowEvent;ImportJava.util.Vector;Importjavax.swing.BorderFactory;ImportJavax.swing.JFrame;Importjavax.swing.JList;ImportJavax.swing.JScrollPane; Public classJList01
of CF products, to ensure the backward compatibility of CF card; disadvantage: limited capacity and large performance limit; Most digital cameras choose CF as their preferred storage medium.SM (Smart Media), Toshiba and Samsung set up the SSFDC forum for major manufacturers to promote SmartMedia as an industry standard; SM card itself has no control circuit and is made of plastic volume small very thin, because the SM card control circuit is integrated in the digital products ( such as digital
Not long ago, the world's electrical appliances giant Whirlpool in the country held a 2015 smart home appliances release and Opening ceremony, began to layout the Chinese market. In the global household appliance market structure turbulence, has ushered in the shuffle period of the key stalls, whirlpool selection contrarian attack, actively layout China, in order to occupy the world household electrical appliances market share of more than 22% of China's household appliances market shares in the
directly referenced.Through the two years of practice and observation, it is found that some of our team colleagues in the initial stage, often experienced code rewrite things, is not necessary, on the one hand, the idea needs to be re-established, on the other hand is a waste of time to improve the quality of code to do refactoring things.6, exercise their own testing abilitySoftware development has always been a good tradition, software development process problems found earlier, the lower th
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.