Skip to content

Instantly share code, notes, and snippets.

@cargowire
Created April 13, 2012 12:06
Show Gist options
  • Save cargowire/2376450 to your computer and use it in GitHub Desktop.
Save cargowire/2376450 to your computer and use it in GitHub Desktop.
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;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment