Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

PHP and UTF-8

Author: bamboo06 on 14-08-2019, 18:43, views: 287

0 When working with the Unicode character set, use the corresponding function instead of the native string function. For example, if a file is encoded as UTF-8 PHP code, if the strlen() function is wrong, use the mb_strlen() function instead.
PHP and UTF-8

If you use substr to intercept Chinese characters, garbled characters will appear, because substr is intercepted in bytes. That is, UTF-8 encoded Chinese, using substr interception, will only intercept 1/3 Chinese, of course, garbled. When UTF-8 is encoded, a Chinese character is 3 bytes. Similarly, different languages in other countries will produce multi-byte strings, so we use mb_strlen() to handle them.

Category: PHP Scripts

 

PHP security of the password hashing

Author: bamboo06 on 14-08-2019, 18:29, views: 100

0 Never know the user's password, we must encrypt the user's password, and can not save the user's original password directly in the database. Do not limit the user password format. If the format is specified, it may be exploited and cracked by the attacker. Of course, we need to limit the minimum length of the password. It is recommended to use at least 8 bits. The longer the better.
PHP security of the password hashing

For password security, developers need to:
1, absolutely can not know the user's password, we must encrypt the user's password, can not save the user's original password directly in the database.
2, do not limit the user password format, if the format is specified, it is likely to be exploited and cracked by the attacker, of course, we need to limit the minimum length of the password, it is recommended to at least 8 bits, the longer the better.
3, can not send the user password through the mailbox, when we develop the application to retrieve the password, the user password is not notified to the user by email, but the link to reset the password is sent to the user in the form of mail, let the user Go to reset the password.

Category: PHP Scripts

 

PHP security data filtering and verification

Author: bamboo06 on 28-07-2019, 18:26, views: 332

0 Never trust external input, don't trust any data from a data source that is not under your direct control. In actual development, there is always someone intentionally or unintentionally injecting dangerous data into PHP code, so PHP security programming becomes important. Generally, we deal with external input security ideas: filtering input and verifying data.
PHP security data filtering and verification

Filtering input means escaping or deleting characters that are not safe from external data.

Category: PHP Scripts

 

PHP+Crontab performs scheduled tasks

Author: bamboo06 on 28-07-2019, 18:16, views: 125

0 When we do web project development, we often need to periodically back up data, periodically restart a service or periodically execute a PHP program, etc., generally use Crontab under Linux and use scheduled tasks under Windows. This article focuses on the basics of using Crontab under Linux and performing PHP tasks.
PHP+Crontab performs scheduled tasks

Crontab is a commonly used timing execution tool for Unix/Linux systems that runs specified jobs without human intervention.

Category: PHP Scripts

 

Cloudflare has a large-scale network failure

Author: bamboo06 on 2-07-2019, 20:45, views: 472

0 On the evening of July 2nd, Cloudflare, a well-known website that provides services such as CDN service and DNS, has network errors in many parts of the world. The use of Cloudflare service website may lead to "502 gateway error", etc., and is affected by the failure of Internet infrastructure service provider Cloudflare. Impact, many websites have encountered downtime, prompting 502 gateway error when accessing.
Cloudflare has a large-scale network failure

Afterwards, Cloudflare CEO Matthew Prince said that this round of downtime was not caused by hacker DDOS attacks, but the server was overloaded. "Due to a bug in the Cloudflare Web Application Firewall (WAF) service, this error caused a significant increase in CPU usage, causing a crash in the primary and backup systems and causing the user's website to encounter a 502 error; therefore, Cloudflare is temporarily down. Part of the WAF's functionality, solved the bug that caused the problem, and re-launched the WAF service."

Category: ---

 

Gates: The biggest regret is that I can't do a good mobile phone system

Author: bamboo06 on 2-07-2019, 20:38, views: 251

0 Recently, it was revealed that Gates once again expressed his "great regret" to the Android system when he participated in the exchange activities organized by venture capital company Village Global.
Gates: The biggest regret is that I can't do a good mobile phone system

Gates said that the biggest mistake he made when managing the company was that he did not let Microsoft become the "non-Apple" operating system platform, and let Android rise, which is a $400 billion business.

Category: Internet

 

Pure CSS to make adaptive article pagination

Author: bamboo06 on 21-04-2019, 02:23, views: 532

0 A pager is one of the front-end components commonly used in web development. It can display data to users in batches. We know that frameworks such as Bootstrap provide very nice tabbed components, but your project may not need Bootstrap, you want to customize a beautiful tab for your own project, so please read this article.
Pure CSS to make adaptive article pagination

This article introduces you to make a beautiful page bar with pure CSS, which can adapt to various mobile screens such as PC and mobile phone. Developers can download the source code and change the css code to customize the style of your own project.

Category: CSS

 

PHP+Crontab performs scheduled tasks

Author: bamboo06 on 21-04-2019, 02:03, views: 248

0 When we do web project development, we often need to periodically back up data, periodically restart a service or periodically execute a PHP program, etc., generally use Crontab under Linux and use scheduled tasks under Windows. This article focuses on the basics of using Crontab under Linux and performing PHP tasks.
PHP+Crontab performs scheduled tasks

Crontab is a commonly used timing execution tool for Unix/Linux systems that runs specified jobs without human intervention.

Category: PHP Scripts / Apps

 

Li Yanhong: China changes technology

Author: bamboo06 on 7-04-2019, 01:57, views: 399

0 CDF Talk (Institute Speech) is an innovative speech event launched by the 20th China Development Forum. The theme of the event is "My Future with China". Twelve representatives from Chinese and foreign outstanding people are invited to share their stories with China. In the first issue, please discuss with Baidu founder, chairman and CEO Li Yanhong "China changes technology."
Li Yanhong: China changes technology

In China, we must make full use of the advantages of data, the advantages of the scene, the advantages of talent, the advantages of capital and the advantages of infrastructure, and push innovation forward.
These innovations can be used not only by China, but also by the world. Through big data, we can create big opportunities for China to contribute technology that belongs to the world.

Category: Internet

 

Google officially closed the short URL service GOO.GL

Author: bamboo06 on 7-04-2019, 01:49, views: 292

0 Google URL Shortener officially announced its cessation of support today. Since March 30, 2018, Google has gradually closed the goo.gl URL short URL service. After April 13, 2018, only existing users will be allowed to continue to use the short link generation service. In addition, the user's analysis data can be viewed and the short link information can be downloaded in CSV format. On March 30, 2019, the goo.gl console will be officially closed.
Google officially closed the short URL service GOO.GL

Google's short URL service goo.gl was launched on December 14, 2009, and it has been 9 years since the service was closed. The existing goo.gl link is still available, but the new link has not been created. Google recommends that developers can turn to their Firebase dynamic links, and regular users can only switch to other short URL services.

Category: Internet

 
Previous Next