【发布时间】:2009-12-23 16:13:06
【问题描述】:
我无法获得在我的 Netbeans 文件模板中工作的项目特定许可。我有一个名为“PHP 文件”的模板。内容是这样的……
<?php
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
?>
我还在“Licenses”目录中添加了一个名为“license-test.txt”的文件模板。它包含此特定项目的许可证信息。
我已经修改了我的“properties.project”文件,为这个项目分配了一个特定的许可证(称为“测试”)。我的“project.properties”文件看起来像这样......
include.path=${php.global.include.path}
source.encoding=UTF-8
src.dir=../../../../../wamp/www/test-project
tags.asp=false
tags.short=true
web.root=.
project.license=test
当我基于“PHP 文件”模板创建新页面时,它会为我提供默认许可,而不是“license-test.php”许可。如果我修改“PHP File”文件模板,并将第 5 行更改为:
<#include "../Licenses/license-test.txt">
...一切正常。所以我知道许可证有效。分配或调用“project.license”变量时一定有错误。有什么想法吗?
我正在使用 Netbeans 6.7.1 (PHP),我一直在关注 this tutorial 以使其正常工作。此外,万一这很重要,我会将我的 Netbeans 项目数据存储在实际网站文件结构之外的位置。
【问题讨论】:
-
我遇到了同样的问题,这个 netbeans 论坛帖子中的其他人也是如此 - forums.netbeans.org/topic11600.html
标签: php templates netbeans licensing