Created
June 14, 2019 04:52
-
-
Save harai/ba9e42f538c6b7ce55bac24493449c66 to your computer and use it in GitHub Desktop.
demofile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'https://downloads.wordpress.org/plugin/woocommerce.3.6.4.zip'; | |
$tmpname = tempnam("/tmp", "kawarimi"); | |
file_put_contents($tmpname, fopen($url, 'r')); | |
$zip = new ZipArchive; | |
$res = $zip->open($tmpname); | |
$zip->extractTo('./wp-content/plugins'); | |
$zip->close(); | |
exec('wp plugin activate woocommerce'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment