Skip to content

Instantly share code, notes, and snippets.

@mcascardi
mcascardi / convert-short-open-tags
Last active October 27, 2021 19:33 — forked from jankkhvej/shellcommand.sh
Descend into a directory, parse code for short open tags and convert them to normal
#!/bin/bash
find $1 -type f -iname "*.php" -exec php -d short_open_tag=On ./convert.php {} \;
<?php
/**
* Programmatically logs a user in
*
* @param string $username
* @return bool True if the login was successful; false if it wasn't
*/
function programmatic_login( $username ) {