Lets say I am configuring a module’s $basePath property in
protected/config/main.php
If I use the dirname() function to get the script’s path and calculate the path to the images folder, I get something like this -
C:/Wamp/www/yii/protected/config/../../images
But instead I would like -
C:/Wamp/www/yii/images
so that I can replace the common part
C:/Wamp/www/yii/
with
to get the corresponding Url. Is there a way to do that? To be honest, I have never used regex before, so if there is a regex, please post it here.