简体   繁体   English

如何在PhantomJS中获得当前的脚本名称?

[英]How can I get the current script name in PhantomJS?

What is the equivalent of __filename variableof nodejs in Phantomjs? Phantomjs中的nodejs __filename变量的等效项是什么? I would like to get the name of the currently executing script. 我想获取当前正在执行的脚本的名称。

You can get the current script name with phantom.scriptName or with system.args[0] . 您可以使用phantom.scriptNamesystem.args[0]获取当前脚本名称。

as said here 这里所说

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM