Home > Backend Development > PHP Tutorial > Examples of set_include_path and get_include_path in php

Examples of set_include_path and get_include_path in php

WBOY
Release: 2016-07-25 09:05:51
Original
818 people have browsed it
  1. set_include_path('/xampp/htdocs/test/include'); //Please note that the '/' in php does not represent the root directory of the website, but the drive letter where the file is located, available echo realpath('/'); View

  2. //If the PHP version is too low, this function is not supported, you can use the general version ini_set()

  3. /*View the real default include path*/

  4. echo realpath(get_include_path());
  5. /*To include cls.mysqli.php just need to*/
  6. require_once('cls.mysqli.php');
  7. $mysql = new Mysql('localhost','root','' ,'test'); //There are no errors in instantiation and subsequent query statements

Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template