1
trabis
How can I add credits/license on php files?
  • 2008/5/3 13:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


The ideia is to paste this code automatically in every php files. Is there a tool?

// $Id: index.php 2 2005-11-02 18:23:29Z skalpa $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //

2
phppp
Re: How can I add credits/license on php files?
  • 2008/5/3 13:51

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Some IDEs do the job.

3
avtx30
Re: How can I add credits/license on php files?
  • 2008/5/3 14:55

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


I guess you wanted to append the header right after the line.

If you use Unix/Linux/Cygwin you can do the task in miliseconds with the following bash script.

#!/bin/sh
for f in `ls *.php`
 do
  (echo '//r header.txt'; echo 'wq') | ed $f;
 done


header.txt is the file that lists your above comments.

Login

Who's Online

373 user(s) are online (235 user(s) are browsing Support Forums)


Members: 0


Guests: 373


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits