跳到主要内容
CNode

nodejs有没有类似JAVA的basePath的方法

社区
Aalgz发布于 12 年前最后回复 12 年前
251260

nodejs有没有类似JAVA的basePath这样在当前页面获得项目路径的方法

查看回复

回复 (2)

Y
yaochun#212 年前

__dirname 属于Global Objects

The name of the directory that the currently executing script resides in.

注意:【the currently executing script】

S
ShlXue#112 年前

printf __dirname

参与回复

登录后即可参与回复。登录