php Joomla 3.0 DS 不工作(使用未定义的常量 DS)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18503023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Joomla 3.0 DS does not work(Use of undefined constant DS)
提问by Techie
Joomla 3.0 DS does not work. It has been removed. I get
Joomla 3.0 DS 不工作。它已被移除。我得到
Notice: Use of undefined constant DS - assumed 'DS' in
How can I fix this?
我怎样才能解决这个问题?
回答by Techie
Add the below line
添加以下行
if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
From the docs.
从文档。
The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead.
DS 常量已被删除。如果你真的需要它,你可以使用 DIRECTORY_SEPARATOR 代替。
Also there is a pluginto fix this issue.
还有一个插件可以解决这个问题。
You can find the full list here.
您可以在此处找到完整列表。
Potential backward compatibility issues in Joomla 3 and Joomla Platform 12.2
回答by András
Sometimes you need this: if(!defined('DS')) define('DS', '/');
有时你需要这个: if(!defined('DS')) define('DS', '/');