Wrong behavior of DIRECTORY_SEPARATOR under Windows?

I got a but report in one of my extensions. I don’t have the details.

DIRECTORY_SEPARATOR is a constant defined by PHP.

please, can we get rid of DIRECTORY_SEPARATOR and use

‘/’
instead?

Only for portability reason.

Thank you,

Paul

It has no problem in Linux/Unix, but yes it is a problem in Windows. Most javascript can not be found (undefined) :

Quote

/domain.com/assets/cb830669\c_c58850e2f5a570faebe6c73ae4bf52e4.js

Firebug says it has not defined. It also didn't work on FireFox & Opera 10. It's work on IE6/7/8.

DIRECTORY_SEPARATOR should only be used for file system paths, not URLs.

http://server.webricate.com/yii/testapp/

Thats how yii base path is being produced by my yiic generated app. How Can i correct it

Using 1.1.5

downloaded today.

As Qiang told you, DIRECTORY_SEPARATOR should only be used for file system paths, not URLs!

DIRECTORY_SEPARATOR used for file system paths works just fine under Windows, what I can prove, as I’m using Yii only under Windows server (XAMPP). If you are using DIRECTORY_SEPARATOR for file system paths, not URLs and have any problems with it then double check your server configuration and/or script, if there aren’t any errors.

And again: this is PHP, not Yii constant, therefore it has nothing to do with Yii Framework, and you should not address problem with it to Yii.