Problème d'include
yves
-
manami -
manami -
Bonjour,
J'ai un sérieux problème d'include.
Je tente d'afficher la newsletter sur ma page d'accueil, mais impossible!!!... Je dois pour ce faire, inclure le fichier suivant :
<?php
// you can include this form in any page of
// your website as follow:
//
// in this file, provide correct values for:
// $path_to_pmnl
// $list_id newsletter id
// then in your page (need to be a php page)
// add this line :
// include("path/to/this/page/form.php");
// NOTA: your page need to use UTF8 encoding
// put
// <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
// in your html header
//path to phpMyNewsletter base directory
$path_to_pmnl="./";
// newsletter id, leave this empty if you want to list available
// newsletter.
//$list_id = 1;
$list_id = "";
//display archive link (true or false) ?
$display_archive=true;
////////////////////// DO NOT MODIFY /////////////////////
if(file_exists("./".$path_to_pmnl."include/config.php")){
include("./".$path_to_pmnl."include/config.php");
include("./".$path_to_pmnl."include/db/db_".$db_type.".inc.php");
}
include("./".$path_to_pmnl."include/lib/libconfig.php");
include("./".$path_to_pmnl."include/interface.php");
include("./".$path_to_pmnl."include/lib/libnewsletter.php");
include("./".$path_to_pmnl."admin/include/function.php");
if(file_exists("./".$path_to_pmnl."include/config.php")){
print newsletter_list($list_id, true, $display_archive);
} else {
include "./".$path_to_pmnl."include/lang/english.php";
echo error_msg(translate("NEWSLETTER_NOT_YET"));
}
?>
Merci d'avance pour votre aide
J'ai un sérieux problème d'include.
Je tente d'afficher la newsletter sur ma page d'accueil, mais impossible!!!... Je dois pour ce faire, inclure le fichier suivant :
<?php
// you can include this form in any page of
// your website as follow:
//
// in this file, provide correct values for:
// $path_to_pmnl
// $list_id newsletter id
// then in your page (need to be a php page)
// add this line :
// include("path/to/this/page/form.php");
// NOTA: your page need to use UTF8 encoding
// put
// <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
// in your html header
//path to phpMyNewsletter base directory
$path_to_pmnl="./";
// newsletter id, leave this empty if you want to list available
// newsletter.
//$list_id = 1;
$list_id = "";
//display archive link (true or false) ?
$display_archive=true;
////////////////////// DO NOT MODIFY /////////////////////
if(file_exists("./".$path_to_pmnl."include/config.php")){
include("./".$path_to_pmnl."include/config.php");
include("./".$path_to_pmnl."include/db/db_".$db_type.".inc.php");
}
include("./".$path_to_pmnl."include/lib/libconfig.php");
include("./".$path_to_pmnl."include/interface.php");
include("./".$path_to_pmnl."include/lib/libnewsletter.php");
include("./".$path_to_pmnl."admin/include/function.php");
if(file_exists("./".$path_to_pmnl."include/config.php")){
print newsletter_list($list_id, true, $display_archive);
} else {
include "./".$path_to_pmnl."include/lang/english.php";
echo error_msg(translate("NEWSLETTER_NOT_YET"));
}
?>
Merci d'avance pour votre aide
A voir également:
- Problème d'include
- PHP: fonction include et liens relatifs ✓ - Forum PHP
- I'm sorry to have to inform you that your message could not be delivered to one or more recipients. it's attached below. for further assistance, please send mail to postmaster. if you do so, please include this problem report. you can delete your own text from the attached returned message ✓ - Forum Mail
- Include un dossier DropBox dans une page web - Forum Webmastering
- I'm sorry to have to inform you that your message could not be delivered to one or more recipients. it's attached below. for further assistance, please send mail to postmaster. if you do so, please include this problem report. you can delete your own text from the attached returned message. - Forum Réseaux sociaux
- Undelivered Mail Returned to Sender ✓ - Forum Mail
6 réponses
Salut yves,
pour inclure cette page dans une autre :
Keanjyto.
pour inclure cette page dans une autre :
include "page_a_inclure.php";Cordialement,
Keanjyto.
Merci pour la réponse rapide.
J'ai bien mis le code suivant dans ma page, mais rien ne s'affiche :-(.
<? include "newsletter/form.php"; ?>
J'ai également modifié mon index avec l'élément suivant : <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Pourtant, si je vais sur le fichier "form.php", tout s'affiche normalement
J'ai bien mis le code suivant dans ma page, mais rien ne s'affiche :-(.
<? include "newsletter/form.php"; ?>
J'ai également modifié mon index avec l'élément suivant : <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Pourtant, si je vais sur le fichier "form.php", tout s'affiche normalement
Je suis en php standard, ma page se nomme index.php.
Arg je m'arrache les cheveux, je suis à la rue.
Arg je m'arrache les cheveux, je suis à la rue.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Te restes -t-il des cheveux ?
Pour faire un include, il faut que tu donnes le chemin relatif complet vers le fichier à inclure. (relatif par rapport au script dans lequel tu veux l'inclure)
//path to phpMyNewsletter base directory
$path_to_pmnl="./";
sert à ça.
si ton fichier est dans le même repertoire mets $path_to_pmnl="";
Pour faire un include, il faut que tu donnes le chemin relatif complet vers le fichier à inclure. (relatif par rapport au script dans lequel tu veux l'inclure)
//path to phpMyNewsletter base directory
$path_to_pmnl="./";
sert à ça.
si ton fichier est dans le même repertoire mets $path_to_pmnl="";