I'm curious about how the website was tampered with. who said the website statistics were tampered?-php Tutorial

Source: Internet
Author: User
I'm curious about how the website was tampered with. who said the website statistics were tampered with? This post was last edited by xjl756213616 at 09:16:19, January 22 ,?

The number of statistics has been changed.
Originally, more than 3650 million
It was changed to more than 50. it was changed at this morning. it looks like the IP address in Guangdong and Shenzhen.

The code is as follows:

Reply to discussion (solution)

1. programs can be used to download arbitrary files.

2. text counters. after reading the data, you may write data first from modifying the data to writing data, which leads to inaccurate data.

$ Num = file_get_contents ("./num. dat ");
$ Num = (int) ($ num) + 1;
File_put_contents ("./num. dat", $ num );

Do I need to lock the Write file? Data will inevitably be lost due to concurrency

Use a database. More accurate

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.