The docs define basePath as: "the root directory of the application."
So, why does echo Yii::app()->basePath; always return /mypath/protected/ ?
It would be far more useful if it returned the expected /mypath/
It seems we have nice easy properties for all the expected directories: modulePath, extensionPath,runtimePath,basePath(/protected/) except the actual root.
I am after the full file system path. This is for simple procedures such as a user uploading images. As such, it should be available as a standard property.
dirname(Yii::app()->request->scriptFile) works, so that is what I will use.
I think we have lost the point of my first post and now are looking at everything that does NOT work.
My original point was that a property that points to the root directory of the application should be available, just as it is for other directories such as modulePath, extensionPath, runtimePath etc.