nodejs有没有类似JAVA的basePath这样在当前页面获得项目路径的方法
回复 (2)
Y
__dirname 属于Global Objects
The name of the directory that the currently executing script resides in.
注意:【the currently executing script】
S
printf __dirname
参与回复
登录后即可参与回复。登录
nodejs有没有类似JAVA的basePath这样在当前页面获得项目路径的方法
__dirname 属于Global Objects
The name of the directory that the currently executing script resides in.
注意:【the currently executing script】
printf __dirname