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 | |
| /* | |
| * Configuration | |
| */ | |
| define('DB_HOST', 'localhost'); | |
| define('DB_USER', 'username'); |
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 | |
| // http://jaspreetchahal.org/php-xml-to-array-simplest-way/ | |
| function xml2array($xml) { | |
| $obj = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); | |
| $json = json_encode($obj); | |
| return json_decode($json, 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 | |
| // http://php.net/manual/en/class.simplexmlelement.php#108867 | |
| function xml2array($xml) { | |
| function normalize_xml2array($obj, &$result) { | |
| $data = $obj; | |
| if (is_object($data)) { | |
| $data = get_object_vars($data); | |
| foreach($obj->getDocNamespaces() as $ns_name => $ns_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
| <?php | |
| function array2xml($arr, $root = false, $header = false) { | |
| if (! function_exists('is_hash')) { | |
| function is_hash($var) { | |
| return ( is_array($var) && array_keys($var) !== range(0, count($var)-1) ); | |
| } | |
| } | |
| if (! function_exists('normalize_array2xml')) { |
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 | |
| /** | |
| * Titre des archives CTP disposant d'une page WP | |
| */ | |
| add_filter('post_type_archive_title', 'fhp_post_type_archive_title'); | |
| function fhp_post_type_archive_title($title) | |
| { | |
| $post_type = get_query_var('post_type') |
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
| RewriteEngine On | |
| #RewriteBase / | |
| # On autorise l'accès à notre adresse IP | |
| #RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123 | |
| # On évite de boucler | |
| RewriteCond %{REQUEST_URI} !^/503\.php | |
| RewriteRule .* 503.php [L] |
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 | |
| // .Htacesss | |
| // --------- | |
| /* | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on |
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
| #!/bin/bash | |
| # | |
| # Exécute diverses tâches `PHP` en boucle | |
| # | |
| # Liste des tâches à exécuter en boucle | |
| TASKS=( | |
| "script-1.php" |
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 `utf8_general_ci` to `utf8_unicode_ci` | |
| -- | |
| -- Génère la requêtes de convertion de la DB `{DB_NAME}` | |
| SELECT CONCAT('ALTER DATABASE `', schema_name, '` DEFAULT COLLATE utf8_unicode_ci;') | |
| FROM information_schema.schemata |
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
| # Release (Testing / Jessie) | |
| # -------------------------- | |
| # Main / Security | |
| Package: * | |
| Pin: release o=Debian,n=jessie | |
| Pin-Priority: 700 | |
| # Multimedia | |
| Package: * |