Difference between set_include_path in win and Linux

Source: Internet
Author: User

Just tuned ProgramAn error occurred when a good program on the server arrived at win.
After careful tuning, we found that it was a problem with set_include_path.
In Windows, if you want to include multiple paths, separate them with ";", but use ":" in Linux ..
The include path setting in zendframe is 11: 55zf. In this example, the include_path does not work, and the existing settings are damaged. Therefore, it is better to set this:

// 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 of the system.

_ App_root_path _ is a constant set by myself, representing the current directory.

Path_separator: this can be said, because the path in win is separated by; (semicolon), but in Linux, it is separated by: (colon, therefore, this constant is used to represent the delimiter.

After this setting, you can use both Windows and Linux.

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.