Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-settings.php on line 530

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 611

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/classes.php on line 728

Strict Standards: Redefining already defined constructor for class wpdb in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/wp-db.php on line 306

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/cache.php on line 103

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/cache.php on line 425

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/theme.php on line 623

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/class.wp-dependencies.php on line 15

Warning: Creating default object from empty value in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/update.php on line 39

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/kses.php on line 948

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Wordics::myWordics_init() should not be called statically in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/plugin.php on line 311
Développement et arts numériques » html
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/sdb/8/f/dev.art/wordpress/wp-includes/kses.php on line 948

Archive

Posts Tagged ‘html’

Récupérer flux de sortie en php

juillet 4th, 2008

Fonctions très utiles pour qui veux mélanger php et html sans avoir peur de perdre la coloration syntaxique ou les possibilités d’auto complétion permises par les éditeurs modernes. Vous éditer un fichier html comportant quelques balises php pour les variables à afficher, et vous le trater à partir d’une fonction similaire à celle-ci :

Exemple :

function affich($vars, $url_du_fichier_a_inclure){
    //rend disponible les variables dans la fonction
    foreach($vars as $n=>$v)$$n=$v;
    //Stoppe le flux de sortie et le bufferise
    ob_start();
    include("url_du_fichier_a_inclure");
    //Sauvegarde du tampon dans une variable
    $buffer = ob_get_flush();
    ob_end_clean ()
?>
Author: Nicolas de Marqué - Fromentin Categories: Web, html, php Tags: ,