Magento version:2.0.0
How to get the theme url in the phtml file? there has a global function for it?
If you're looking for a replacement of $this->getSkinUrl()
from Magento 1 then the equivalent in Magento 2 is the following:
$block->getViewFileUrl()
What do you mean by theme url? What aspect of the theme? E.g skin, template, base URL etc.
If you want the skin URL then Raphael's answer is correct, if you want the template URL it is:
$block->getTemplateFile('module_name::template-name.phtml'))
To get the base url:
$this->getBaseUrl()