Get_include_path ()

Source: Internet
Author: User
Get_include_path (): where is get_include_path () obtained? echoget_include_path (); // why is the output C: \ php \ pear? I often see set_in get_include_path () problems
Where does get_include_path () obtain the path?

Echo get_include_path (); // why is the output C: \ php \ pear?

Because I often see set_include_path (get_include_path (). PATH_SEPARATOR. $ path );
But I don't know why I need to add the get_include_path () function instead of writing it as follows.
Set_include_path ($ path );

In fact, the most important thing is that I don't understand the meaning of get_include_path ();


------ Solution --------------------
Include_path php search path

Get_include_path () returns the value of the current include_path.
It is usually the value of include_path in php. ini.

PATH_SEPARATOR include_path: windows; linux:

Set_include_path: set include_path
If get_include_path () is not appended, it is acceptable, but the range is different. But do not complain: the previously runable program cannot be used.
------ Solution --------------------
Set_include_path (get_include_path (). PATH_SEPARATOR. $ path );

After this write, include the file again. The path is relative to the above, so you do not need to write an absolute path, which is also convenient to change the 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.