[prev] [index] [next]

Exercise: cat

Write a PHP script to emulate the behaviour of

$ cat File1 File2 ...

Assume there will always be at least one file.

Write a simple version using the readfile function.

Write a more complex version using fopen, etc.

Add appropriate error-checking to both scripts.