Skip to content

Instantly share code, notes, and snippets.

Created April 13, 2012 12:06
What would you like to do?
Export all php files as static html files
# 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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment