You want to use the PATH_INFO function. But I don't know where to add it? Solution

Source: Internet
Author: User
You want to use the PATH_INFO function. But I don't know where to add it? This is a functional website for viewing Web page source code. The code is as follows. Thank you for using the PATH_INFO function. But I don't know where to add it?
This is a function for viewing Web page source code.
The URL is like this.
Www.vipcha.net/5/
The function I want to implement is as follows:
Www.vipcha.net/5/www.baidu.com // add a website address based on the original website.


The code is as follows. Thank you.
PHP code
  
  Alert ('Enter the correct domain name! '); Location. href = 'index. php'; script "); $ content = @ file_get_contents (" http ://". $ domain); @ require_once ('cache. php '); if (file_exists ("cache/cache. php ") {@ require_once (" cache/cache. php "); $ urls = filehave ($ urls, $ domain);} else {$ urls = fileno ($ domain);} writeover (" cache/cache. php ","
  ") ;}?>
  Webpage source code viewer<? Php echo $ content;?>Recent query
  
  
$ V) {echo "". $ urls [$ key]. "" ;}}?>


------ Solution --------------------
Do not submit forms

Jump with js

The server accepts parameters and enables rewrite.
------ Solution --------------------
PHP code
  
------ Solution --------------------
The URL is www.vipcha.net/5/
Then you actually access www.vipcha.net/5/index.php.
If the 5/5 parameter is appropriate, it is necessary to do so www.vipcha.net/index.php/5.
This is PATH_INFO.

The function I want to implement is as follows:
Www.vipcha.net/5/www.baidu.com
This requires urlrewrite because you need to hide the php file name.
Related Article

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.