Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I execute multiple php files via command line?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Just call them one after each other:

a.php; b.php; c.php
share|improve this answer
4  
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
add comment

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.

share|improve this answer
    
Your name is pretty slick, but I might have added "Some Totally Random Guy". –  Xeoncross Apr 29 '11 at 15:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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