Is there a var with the application (public) path… I can only find.
Yii::app()->request->scriptFile
But I’m wondering if there is something with only the path ?
Is there a var with the application (public) path… I can only find.
Yii::app()->request->scriptFile
But I’m wondering if there is something with only the path ?
Yii::getPathOfAlias('application')
Thanks but I moved the protected dir outside… I want to get the patch of the public directory which is different.
But I guess there is not will just use <?php echo str_replace(‘index.php’, ‘’, Yii::app()->request->scriptFile);?>
I am using:
$rootPath = pathinfo(Yii::app()->request->scriptFile);
'params'=>array(
'photoUploadDir' => $rootPath['dirname'] . '/uploads/photos',
'thumbUploadDir' => $rootPath['dirname'] . '/uploads/photos/thumbs',
'albumUploadDir' => $rootPath['dirname'] . '/uploads/albums',
),
Yii::getPathOfAlias('webroot');