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
$actual_link = "http://$_SERVER['HTTP_HOST']$_SERVER['REQUEST_URI']"; |
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
ALTER TABLE my_table ADD CONSTRAINT my_key FOREIGN KEY ('some_id') | |
REFERENCES some_new_table ('some_other_id') ON UPDATE CASCADE ON DELETE CASCADE | |
#Die entsprechenden Spalten müssen exakt gleich sein. Zudem muss auf den entsprechenden | |
#Spalten ein Index initialisiert werden. Desweiteren muss es sich bei den | |
#Tabellen Engines um InnoDB handeln. | |
#http://stackoverflow.com/questions/11073706/how-to-alter-a-mysql-tables-foreign-key-using-the-command-line | |
#http://stackoverflow.com/questions/4061293/mysql-cant-create-table-errno-150 |
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
<script type="text/javascript"> | |
try { | |
this.print(); | |
} | |
catch(e) { | |
window.onload = window.print; | |
} | |
</script> |
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
https://github.com/BureauPartners/SEPA-Incasso | |
https://github.com/digitick/php-sepa-xml | |
https://github.com/blaaat/php-sepa-credit-transfer | |
https://github.com/dmitrirussu/php-sepa-xml-generator | |
https://github.com/congressus/sepa-direct-debit | |
https://github.com/Celp-nl/sepa-dd-xml |
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
ignore_user_abort(1); // run script in background | |
set_time_limit(0); // run script forever | |
$interval=60*15; // do every 15 minutes... | |
do{ | |
// add the script that has to be ran every 15 minutes here | |
// ... | |
sleep($interval); // wait 15 minutes | |
}while(true); |
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 | |
$now = time(); // or your date as well | |
$your_date = strtotime("2010-01-01"); | |
$datediff = $now - $your_date; | |
echo floor($datediff/(60*60*24)); | |
?> |
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
function mysql_41_password($in){ | |
$p = sha1($in,true); | |
$p = sha1($p); | |
return "*".strtoupper($p); | |
} |
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
// Test image. | |
$fn = 'gfx/check_mail.gif'; | |
// Image not cached or cache outdated, we respond '200 OK' and output the image. | |
header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($fn)).' GMT', true, 200); | |
header('Content-Length: '.filesize($fn)); | |
header('Content-Type: image/gif'); | |
readfile($fn); |
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
FROM_UNIXTIME(timestamp,'%d.%m.%Y') #Gibt ein schön formatiertes Datum aus | |
#Build an automated CURENT_TIMESTAMP to UNIX-DATE converter by using a TRIGGER | |
CONVERT CURENT_TIMESTAMP TO UNIX-DATE SET NEW.date = UNIX_TIMESTAMP(NOW()) |
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
Datumszwischenraum: =DATEDIF(F1;F2;"d") [Parameter: d,m,Y] | |
UNIX Zeit umrechnen: =DATUM(1970;1;1)+(LINKS(F1;10)/86400) |