这个路径应该如何写啊(小弟我是初学者~)

WBOY
Release: 2016-06-13 11:50:30
Original
835 people have browsed it

这个路径应该怎么写啊?(我是菜鸟~~~~~)
我用的dedecms系统建的网站, php+mysql, 虚拟主机下有三个目录: web, Data, logo

我现在想把web目录下的数据库文件夹data移到虚拟主机下的Data目录, 文件夹已经移OK了


怎样改这两个配置文件的相对路径啊?


这个是common.inc.php文件要改的路径:

define('DEDEDATA', DEDEROOT.'/data');


这个是系统后台模板缓存目录要改的路径:

/data/tplcache
------解决方案--------------------
试试$_SERVER['DOCUMENT_ROOT']
define('DEDEDATA', $_SERVER['DOCUMENT_ROOT'].'/data');

------解决方案--------------------
DEDEROOT应该是被定义指向到web,而你把这个data目录移动到web目录平级目录Data去了。所以就不能再用DEDEROOT作为路径顶级了。你可以再重新定义一个常量至Data目录,再用这个新常量后面连上data目录。

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!