用Netbeans(版本8.2)写php配置模板,模板配置好,可以省很多事,方便开发,而且,显得很专业。

新建php文件时:

<?php

/**
* Encoding : UTF-8
* Created on : 2018-9-16 12:31:33 by author , email@xxx.com
*/

配置步骤:
1.choose License Headers in Project Properties(项目-属性-许可标头),设置:
/**
* Encoding : ${encoding}
* Created on : ${date} ${time} by ${author} , ${email}
*/

2.变量需要在 choose Tools | Templates(工具--模板),打开php里面的--“PHP 文件”,,点击设置,配置用户属性--User.properties文件:

email=youremail@xxx.com
author=author
${date?date?string("yyyy-m-d")}
${time?time?string("H:i:s")}

写入变量就可以了。
日期和时间的格式和php相同,
变量名字可以自己定义。

官方的模板变量名列表:
http://wiki.netbeans.org/FaqTemplateVariables

${date} inserts the current date, in this format: Feb 16, 2008
${encoding} inserts the default encoding, such as: UTF-8
${name} inserts the name of the file.
${nameAndExt} inserts the name of the file, together with its extension.
${package} inserts the name of the package where the file is created.
${time} inserts the current time, in this format: 7:37:58 PM
${user} inserts the user name.
${project.license} based on the value (e.g., 'CDDL'), the license header is found and is inserted into the template.
${project.name} inserts the project name
${project.displayName} inserts the project displayname

done!

netBeans 修改新建php文件头部注释模板的更多相关文章

  1. VS2013 添加文件头部注释模板

    在看视频的时候发现,视频中每次新建一个类文件 都会自动生成一串 头部的注释:

  2. PHPSTORM设置新建PHP文件头部注释

    1.选择 File|setting 2.在Editor|File and Code Templates,见下图标记更改即可

  3. 在 Xcode9 中自定义文件头部注释和其他文本宏

    在 Xcode9 中自定义文件头部注释和其他文本宏 . 参考链接 注意生成的plist文件的名称为IDETemplateMacros.plist 在plist文件里设置自己想要的模板 注意plist存 ...

  4. vscode笔记(一)- vscode自动生成文件头部注释和函数注释

    VsCode 自动生成文件头部注释和函数注释 作者:狐狸家的鱼 本文链接:vscode自动生成文件头部注释和函数注释 GitHub:sueRimn 1.安装插件KoroFileHeader 2.设置 ...

  5. vs开发nodejs系列之 修改新建js文件的模板

    文件位置 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft ...

  6. Sublime Text 自动生成文件头部注释(版权信息):FileHeader 插件的使用

    (一)安装步骤 1.先安装一个 Package Control 插件.相信大家使用 Sublime 的话都有安装这个了2.Preference -> Package Control -> ...

  7. Xcode模版生成文件头部注释

    在使用Xcode创建工程或者新建类的时候,顶部都会有一些xcode帮我们生成的注释 //// MySingletonClass.h// 单例模式//// Created by mark on 15/8 ...

  8. 自定义更改 Xcode 新建 .h/.m 文件头部注释说明(文件名、工程名、作者、公司、版权等)信息

    使用 Xcode 新建工程文件时,或默认生成一套注释说明信息在 .h/.m 文件的头部,说明了创建这个文件的名称.工程名.日期.作者.公司.版权等信息 // // ___FILENAME___ // ...

  9. 修改ZendStudio新建php文件时的模板

    zendstudio默认的模板不适用,可以自己到Window -- preferences -- php -- code style -- code templates -- code -- samp ...

随机推荐

  1. PHP中session_start 函数详解使用方法

    一.官方 session_status() 返回值为: PHP_SESSION_DISABLED 会话是被禁用的. PHP_SESSION_NONE 会话是启用的,但不存在当前会话. PHP_SESS ...

  2. mysql字段添加修改删除

    MySQL添加字段和修改字段   MySQL添加字段的方法并不复杂,下面将为您详细介绍MYSQL添加字段和修改字段等操作的实现方法,希望对您学习MySQL添加字段方面会有所帮助. 1添加表字段 alt ...

  3. springboot (spring mvc)集成swagger

    最近用springboot构建rest接口,考虑到最方便的验证接口,想到了引入swagger. 基本的步骤大致如下: 1.pom中引入swagger依赖: <dependency> < ...

  4. HDU 6077 17多校4 Time To Get Up 水题

    Problem Description Little Q's clock is alarming! It's time to get up now! However, after reading th ...

  5. HDU 1004 Let the Balloon Rise(map应用)

    Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...

  6. swift简单处理调用高清大图导致内存暴涨的情况

    开发中,通常需要用到使用选取多张图片的功能,但是高清大图很吃内存,我想到的处理方案就是拿到高清大图的时候,重新绘制一张小的图片使用.至于清晰度尚可,至少我是分辨不出多大区别. 基本思路就是先固定宽,然 ...

  7. python logging 模块的应用

    对一名开发者来说最糟糕的情况,莫过于要弄清楚一个不熟悉的应用为何不工作.有时候,你甚至不知道系统运行,是否跟原始设计一致. 在线运行的应用就是黑盒子,需要被跟踪监控.最简单也最重要的方式就是记录日志. ...

  8. 全卷积神经网络FCN

    卷积神经网络CNN(YannLecun,1998年)通过构建多层的卷积层自动提取图像上的特征,一般来说,排在前边较浅的卷积层采用较小的感知域,可以学习到图像的一些局部的特征(如纹理特征),排在后边较深 ...

  9. vim 删除

    shift + $ :光标往后 shift + ^ :光标往前 shift + D 删除当前光标直到末尾

  10. [LeetCode&Python] Problem 349. Intersection of Two Arrays

    Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1 ...