Get application server path?

Is there a var with the application (public) path… I can only find.


But I’m wondering if there is something with only the path ?


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);


	'photoUploadDir' => $rootPath['dirname'] . '/uploads/photos',

	'thumbUploadDir' => $rootPath['dirname'] . '/uploads/photos/thumbs',

	'albumUploadDir' => $rootPath['dirname'] . '/uploads/albums',