Create a gist now

Instantly share code, notes, and snippets.

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;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment