# [SOLVED]: Notice: Use of undefined constant DS – assumed ‘DS’ in

> The DS constant has been removed in Joomla 3. If you really need it you can use DIRECTORY_SEPARATOR instead or insert the below code in your php file. RELEASE, “2.5”, “

- URL: https://www.web357.com/blog/solved-notice-use-of-undefined-constant-ds-assumed-ds-in
- Published: 2014-09-08
- Updated: 2025-08-20
- Categories: [joomla](https://www.web357.com/blog/category/joomla)

The DS constant has been removed in Joomla 3. If you really need it you can use DIRECTORY\_SEPARATOR instead or insert the below code in your php file.

```
<?php
/* BEGIN: Define DS */
JLoader::import( "joomla.version" );
$version = new JVersion();
if (!version_compare( $version->RELEASE, "2.5", "<=")):
   if (!defined("DS")):
      define("DS", DIRECTORY_SEPARATOR);
   endif;
endif;
/* END: Define DS */
?>
```

Also there is a [joomla plugin](http://extensions.joomla.org/extensions/core-enhancements/performance/scripts/22533), named “DS Constant Plugin”, to fix this issue.

---

Part of [Web357](https://www.web357.com). Site map for agents: [llms.txt](https://www.web357.com/llms.txt), [llms-full.txt](https://www.web357.com/llms-full.txt). Documentation: https://docs.web357.com/. Support: https://www.web357.com/support. Append `.md` to any page URL on this site to read it as Markdown.
