PHP, Set_include_path

Source: Internet
Author: User

Code Show:

1<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">2"http://www.w3.org/1999/xhtml"xml:lang="ZH-CN">34<meta http-equiv="Content-type"Content="Text/html;charset=utf-8"/>5<title> Page Title </title>6<meta name="keywords"Content="keyword list"/>7<meta name="Description"Content="Web Page Description"/>8<link rel="stylesheet"Type="Text/css"href=""/>9<style type="Text/css"></style>Ten<script type="Text/javascript"></script> One A<body> -<?PHP -     //set the value of Include_path in the configuration file-the settings in the code are only valid for the current code.  the     //and the settings here, no need to restart Apache . -Set_include_path ('D:\00-Code\PhpStorm\Demo\demo01'); -      -     //the more common approach: +$path = Get_include_path ();//get the Include_path value of the system first -$path _new = $path. Path_separator."c:/"; +     //Path_separator: is a system constant that represents a directory separator: A     //UNIX series, is ":" at     //window series, is ";" -Set_include_path ($path _new);//then set the PAHT path you want to join. -     //this will not destroy (lost) the original path settings -      -Echo"<p> Current working directory:". GETCWD ().'</p>';//GETCWD () get the current working directory -      in     //relative path: - //include ' c.php '; to      +?> -</body> the

Results show:

Current working directory: D:\00-Code\PhpStorm\Demo\demo01

PHP, Set_include_path

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.