Is there any function to return the basepath in Zencart?
by HTTP_SERVER
and DIR_WS_CATALOG
you can get URL
while
by DIR_FS_CATALOG
you can get absulute file path
Those are constant defined in configuration file located in includes folder.
There is no need to use any function