我经常需要在代码段中访问自己的(外部)IP地址。如果有一种自动获取并包含它的方法,那就太好了。也许它可以自动触发脚本?如果可能的话,我找不到任何文档。
这是目前的代码段:
<snippet>
<content><![CDATA[
if(\$_SERVER['REMOTE_ADDR']=="${1:87.81.234.232}")echo("<pre>".htmlentities(print_r(${0:var},true))."</pre>");
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>prjm</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
最佳答案
看看String Utilities包
编辑:对不起,不能在摘要中使用,但是看一下插件源可能是值得的
关于ip-address - 在Sublime Text 3中,有没有办法在代码段中使用IP地址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23018105/