Problems with PHP.ini encountered in PHP

Source: Internet
Author: User
Problems with php.ini in PHP
I configured the path of include_path in PHP.ini (Unix and Windows my win7 system is configured under Windows), when using include in PHP, the file under the configured path is said to be unable to find, or to use absolute path, Or put it in a folder at the same level.
------Solution--------------------
Include_path indicates that the include command refers to the path to a file, and after setting this value, you can write a relative path in the PHP code to import a file. Under Windows, for example, Include_path is "c:\code\php" and the Include command is written include= "file1.php" so that the true path to the imported file is "c:\code\php\file1.php".
------Solution--------------------
The structure of the catalogue
include/function.php
www/index.php

function.php

function Test () {
Echo ' Hello world ';
}
?>


index.php include function.php

Include ". /include/function.php ";
Test ();
?>
  • 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.