How to get the url of the SuiteCRM application index.php

I would like to know , How to get the URL of the SUITECRM application.
Ex : http://localhost:8088/mySuite/index.php or

I am going to built a URL for a record. So i need to have the application URL to build the URL for the record.
Ex: http://localhost:8088/suiteCRM78/index.php?module=CustomModulet&action=DetailView&record=" . $record_id

Is there any other way to get the Site URL of the SuiteCRM application?. If you can share any other ways to do this, that will be helpful.


I tried these but could not get what I neeed

global $sugar_config;
$siteUrl = $sugar_config['site_url'];

Thank You, It worked as I expected