0

How do I execute multiple php files via command line?

1

Just call them one after each other:

a.php; b.php; c.php
  • 5
    Just a quick note: With ;, all subsequent commands will execute when one failed. with "&&", further commands will only execute when the previous finished without error. – fab Apr 29 '11 at 15:18
1

Or if you don't want to type out all the names:

ls *.php | xargs -tn1 php

This being Unix, there are many (many) other ways to do this too.

  • Your name is pretty slick, but I might have added "Some Totally Random Guy". – Xeoncross Apr 29 '11 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.