ip-address - 在Sublime Text 3中,有没有办法在代码段中使用IP地址?

标签 ip-address sublimetext code-snippets

我经常需要在代码段中访问自己的(外部)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/

相关文章:

java - 确定网络掩码在 Java 中是否有效

c - 段错误(核心转储)指针问题

PHP session Cookie 因用户更改 IP 而失败

python - 在 Sublime Text 2 中设置 Python IDE 时出现问题。错误 : [Error 2] The system cannot find the file specified

ip - IPv6 地址的文本表示的最大长度?

sublimetext - Sublime Text 2 - 打开最近的键绑定(bind)?

css - 如何使用 Sublime Text 2 删除 CSS 中冒号后的多余空格?

code-snippets - 覆盖 Atom 中的默认片段

c# - 在 C# 中有没有办法以旧的 Pascal "with"关键字方式访问对象属性?

postgresql - 如何使用 PostgreSQL 代码片段?