echo “<script type=\”text/javascript\” charset=\”utf-8\”>window.self.close()</script>”;
Month: July 2015
PHP hapus files pada suatu direktori
<?php
// Specify the target directory and add forward slash
$dir = “myFolder/”;
// Open the directory
$dirHandle = opendir($dir);
// Loop over all of the files in the folder
while ($file = readdir($dirHandle)) {
// If $file is NOT a directory remove it
if(!is_dir($file)) {
unlink (“$dir”.”$file”); // unlink() deletes the files
}
}
// Close the directory
closedir($dirHandle);
?>
Mengambil 2 digits terakhir thn ini
var twoDigitsCurrentYear = parseInt(new Date().getFullYear().toString().substr(2,2));