This file contains hidden or 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 | |
$command = exec('sudo ./update.sh'); | |
print_r($command); | |
?> |
This file contains hidden or 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 | |
// This function will add ?ver=XXXX at the end of the file | |
function AddTimestampToAssets( $assetURI ) { | |
// Get the FULL Relative URL | |
$relativeURL = getcwd() . '/' . ltrim( (str_replace( home_url(), '', $assetURI )), '/' ); | |
// Check if the $relativeURL contains "?ver=", if so remove it | |
if ( strpos ($relativeURL, "?ver=") ) | |
$relativeURL = explode("?ver=", $relativeURL)[0]; |
This file contains hidden or 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 | |
namespace app\controllers; | |
use app\models\Uploads; | |
class UploadsController extends \lithium\action\Controller { | |
public function index() { | |
$upload = Uploads::first($this->request->id); | |
return compact('upload'); |