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 | |
session_start(); | |
$locale = "fr_FR"; | |
putenv("LC_ALL=".$locale); | |
setlocale(LC_ALL, $locale); | |
bindtextdomain("messages", "./locale"); | |
textdomain("messages"); |
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
# LESS CSS | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^css/(.+).css$ /less.php?route=css/$1.less [L,QSA] |
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
# Add local-only domains here, queries in these domains are answered | |
# from /etc/hosts or DHCP only. | |
local=/localnet/ |
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 | |
function clearOption($uniqid,$name) { | |
/* Suppression de la valeur en session ainsi que MySQL */ | |
unset($_SESSION['options'][$name]); | |
mysql_query("DELETE FROM users_options WHERE uniqid = '".mysql_real_escape_string($uniqid)."' AND name = '".mysql_real_escape_string($name)."' LIMIT 1"); | |
return true; |
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 | |
/** | |
* @var array $data Le tableau qu'on veut sortir en XML ou JSON(P) | |
* @var (xml|json) $format Le format de sortie désiré | |
* @var string $callback Le nom de la fonction à appeler si on veut faire du JSONP | |
*/ | |
$data = array(); | |
$format = 'xml'; |
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 | |
/** | |
* Allow scripts to "die" following the HTTP Request type (AJAX or not) | |
* @param $msg Message to send if sent through AJAX | |
* @return void | |
*/ | |
function xhrDie($msg) { | |
$headers = apache_request_headers(); |
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 | |
/** | |
* Exemple de variables Memcache | |
* Il faut absolument configurer le common name, pour pas faire de collision entre données | |
* si on a plusieurs sites avec le même Memcache. | |
*/ | |
$memcache = new Memcache(); | |
$memcache->addServer('localhost',9000); |
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 | |
/** | |
* Retourne la langue préférée du navigateur. | |
* | |
* @return string | |
*/ | |
function getLanguage() { |
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
# EDIT: | |
# IP PORT | |
# ca.crt | |
# client.crt | |
# client.key | |
client | |
dev tap | |
proto tcp | |
remote IP PORT |
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
xdebug.remote_enable = 1 | |
xdebug.remote_host = localhost | |
xdebug.remote_port = 9000 | |
xdebug.idekey = "tacrukjallaistefilermonide" | |
xdebug.remote_connect_back = 1 |