怎么取得路径返回父目录呢

WBOY
Release: 2016-06-13 10:04:27
Original
1057 people have browsed it

如何取得路径返回父目录呢?
admin 和 date admin目录里的某文件要require date目录里的一个文件 怎么做啊?


require (dirname(__FILE__)."../date/my_class.php")

------解决方案--------------------
弄清 admin 和 date admin目录的关系再说
------解决方案--------------------

PHP code
if (!defined('DS'))  define('DS',DIRECTORY_SEPARATOR);$arr = explode(DS,dirname(__FILE__));array_pop($arr);require_once (implode(DS,$arr).DS."date".DS."my_class.php");<div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!