How to get the home directory from a PHP CLI script?

前端 未结 13 1037
生来不讨喜
生来不讨喜 2020-12-08 03:45

From the command line, I can get the home directory like this:

~/

How can I get the home directory inside my PHP CLI script?



        
相关标签:
13条回答
  • 2020-12-08 04:37
    dirname(__DIR__);
    
    0 讨论(0)
提交回复
热议问题