Local inclusion of PHP

Source: Internet
Author: User
For details about the local inclusion of PHP-Linux Enterprise Application-Linux server application, refer to the following. Author: Ryat

When local inclusion is used, % 00 is often used to truncate the subsequent string, but % 00 is escaped when GPC is ON. Is there any other method?

In fact, it has been mentioned before that a certain number of/break through the operating system's limit on the length of the file name is used to cut off the subsequent strings.

It is mentioned in this article that it can only be used in windows. In fact, it can be used in some Linux Hosts, but the number of "/" is more (to make the file path name length greater than 4096 bytes ), take a look at the following code snippet:
CODE: $ A = '';
For ($ I = 0; $ I <= 4071; $ I ++ ){
$ A. = '/';
}
$ A = 'test.txt '. $ a; // The complete path is/var/www/test/test.txt.
Require_once ($ a. '. php ');
?>

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.