Set_include_path the difference between win and Linux _php tutorial

Source: Internet
Author: User
Just tune program, originally on the server good program to win under incredibly error.
Later the careful mode to find is set_include_path problem.
Under win, when you want to include multiple paths, you use ";" to separate it, but use ":" Separated under Linux.
The Include path setting in Zendframe 2007-06-29 11:55zf in the example of include_path feeling is not good, will destroy the existing settings, so I feel that this is better to set:

Include Path Setting
Set_include_path (Get_include_path (). Path_separator. __app_root_path__. ' Library '. Directory_separator. ' ZF '. Directory_separator);

Require ' zend/loader.php ';



Get_include_path () is the current Inc_path path for the system.

__app_root_path__ is a constant that I set myself, representing the current directory.

Path_separator This can be said, because win under the path is used; (semicolon), but Linux is divided by: (colon), so use this represented to represent the separator.

After this setting, it can be used under Win and Linux.

http://www.bkjia.com/PHPjc/318523.html www.bkjia.com true http://www.bkjia.com/PHPjc/318523.html techarticle just tune program, originally on the server good program to win under incredibly error. Later the careful mode to find is set_include_path problem. Under win, when you want to include multiple paths ...

  • 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.