Comments remove

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Pozor
Forum Commoner
Posts: 74
Joined: Tue Mar 30, 2004 11:11 pm
Location: Switzerland

Comments remove

Post by Pozor »

Hi,

i wanna remove all comments form a php file,
somebody knows a thread here that is about that topic, i couldnt find one.
but im shure i saw once one with this kinda topic.

greez Pozor
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

You could run the files through php using the -w flag that will strip comments and whitespace.

Code: Select all

php -w script.php > clean.php
Pozor
Forum Commoner
Posts: 74
Joined: Tue Mar 30, 2004 11:11 pm
Location: Switzerland

Post by Pozor »

And how can i do this with a normal php skript without a shell?

with exec or system or so?

greez Pozor
Post Reply