首页 > 开发 > php > 正文

自己的项目如果包含别人的开源代码,licence文件应放在哪里

2017-09-06 15:07:08  来源:网友分享

以下是licence文件内容

Copyright (c) 2008 Alan SzlosekPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.

licence文件放在如图所示的地方可以吗?

解决方案

感请。
我认为你这样放是可以的。

上面@joyqi的回答,是说你自己写的软件,要开源的话,版权声明应该放在什么地方,需要指出的是,文件名不一定是license.txt,也有叫copying(mysql是这样的)、copyright、copyleft、license(无后缀)、开源协议名(xampp就是gpl.txt),甚至还有用html和pdf的。

如果你引用第三方的开源软件,版权文件可以这样放:

  1. 保留第三方软件自己的目录结构,在其根目录下一般就有版权声明文件
  2. 在你的软件根目录放置它的版权说明,如vemplator_license.txt
  3. 如果你引用的第三方软件特别多,你也可以在你的软件根目录建一个文件夹,专门放你引用的各个开源软件的版权文件。