ホームページ >バックエンド開発 >PHPチュートリアル >Sublime Editor で PHP ヘッダーのバージョン宣言をすばやく入力する方法

Sublime Editor で PHP ヘッダーのバージョン宣言をすばやく入力する方法

WBOY
WBOYオリジナル
2016-06-13 11:59:141125ブラウズ

Sublime エディターで PHP ヘッダーのバージョン宣言を素早く入力する方法

Sublime メニュー バー->ツール→新規スニペット→次のコンテンツを取得します:


次を入力します:

<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><snippet<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span>    <span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><content<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"><![CDATA[</span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"><?php</span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5">/**</span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"> * @version  1.0</span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"> * @author  xinhua3</span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"> * @date     </span><span class="sc2" style="margin:0px; padding:0px; line-height:1.5"> */</span> <span class="sc2" style="margin:0px; padding:0px; line-height:1.5">]]></span><span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"></content<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span><span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><tabTrigger<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span>phpheader<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"></tabTrigger<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span><span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><description<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span>phpheader<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"></description<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span><span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"></snippet<span class="re2" style="margin:0px; padding:0px; line-height:1.5">></span></span></span>
<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><span class="re2" style="margin:0px; padding:0px; line-height:1.5"><span style="color:rgb(51,51,51); font-family:Arial,sans-serif; font-size:13px; line-height:19.5px; background-color:rgb(254,254,242)">然后保存文件名为phpheader.sublime-snippet,保存到指定路径,如图2</span></span></span></span>
<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><span class="re2" style="margin:0px; padding:0px; line-height:1.5"><span style="color:rgb(51,51,51); font-family:Arial,sans-serif; font-size:13px; line-height:19.5px; background-color:rgb(254,254,242)"><img src="/img/2014/06/09/14023081.jpg" alt=""></span></span></span></span>
<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><span class="re2" style="margin:0px; padding:0px; line-height:1.5"><span style="color:rgb(51,51,51); font-family:Arial,sans-serif; font-size:13px; line-height:19.5px; background-color:rgb(254,254,242)"></span></span></span></span>
<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><span class="re2" style="margin:0px; padding:0px; line-height:1.5"><span style="color:rgb(51,51,51); font-family:Arial,sans-serif; font-size:13px; line-height:19.5px; background-color:rgb(254,254,242)">然后打开一个新的文件,在文件的开头输入phpheader再按tab按键,那么此时php头部文件即可生成,如图</span></span></span></span>
<span class="sc3" style="margin:0px; padding:0px; line-height:1.5"><span class="re1" style="margin:0px; padding:0px; line-height:1.5; color:rgb(0,0,255)"><span class="re2" style="margin:0px; padding:0px; line-height:1.5"><span style="color:rgb(51,51,51); font-family:Arial,sans-serif; font-size:13px; line-height:19.5px; background-color:rgb(254,254,242)"><img src="/img/2014/06/09/14023082.jpg" alt=""></span></span></span></span>

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。