Created
April 13, 2012 12:06
-
-
Save cargowire/2376450 to your computer and use it in GitHub Desktop.
Export all php files as static html files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uses php cli to run all php files in the current directory and write their output to file | |
# Argument 1 is the extension of the output files e.g. ".html" or ".htm" | |
# Argument 2 is a prefix for the filenames | |
for file in *.php; do | |
php $file | cat > $2${file%.php}$1; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment