Skip to content

Instantly share code, notes, and snippets.

@pdewouters
Last active December 28, 2015 07:49
Show Gist options
  • Select an option

  • Save pdewouters/7467405 to your computer and use it in GitHub Desktop.

Select an option

Save pdewouters/7467405 to your computer and use it in GitHub Desktop.
<?php
if ( function_exists( 'shell_exec') ) {
$pattern = escapeshellarg( 'wp-config.php' );
$file = escapeshellarg( '.file-manifest' );
$command = "sed -i '/^$pattern/ d' $file";
$output = shell_exec( $command );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment