- Statut : non résolu
- Ce sujet contient 0 réponse, 1 participant et a été mis à jour pour la dernière fois par
baudry, le il y a 14 années et 9 mois.
Affichage de 1 message (sur 1 au total)
-
AuteurMessages
-
16 février 2009 à 15 h 19 min #467380
Bonjour,
Ma configuration WP actuelle wordpress 2.7
– Version de WordPress :
– Thème utilisé :
– Plugins en place :
– Nom de l’hebergeur :
– Adresse du site : http://olivierbaudrydesign.free.frProblème(s) rencontré(s) :
Venant de rajouter une page pour télécharger des contenu de mon site web je rencontre des erreurs et ne voie pas comment faire : http://olivierbaudrydesign.free.fr/?page_id=51/
<?php
/*
Template Name: Upload
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Description" content="<?php bloginfo('description'); ?> » />
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?> » /> <!-- leave this for stats please -->
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/blog.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/menu.css » type= »text/css » media= »screen » />
<link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/oupocreanum/images/favicon.ico » type= »image/x-icon » />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?> » />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?> » />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?> » />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?> » />
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>
<body>
<div id="blog"><!-- begin blog -->
<div id="content">
<div id="twitter_div"><!-- begin twitter -->
<h2 class="twitter-title">Twitter</h2>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/oupocreanum.json?callback=twitterCallback2&count=5"></script><!-- stop twitter -->
<div id="dopplr-blog-badge">
<script type="text/javascript" src="http://www.dopplr.com/blogbadge/script/05a27b2d8e16be40e6d99457bbc7c287"></script></div>
<h1 id="header"><a href="<?php echo get_settings('home'); ?>« ><?php bloginfo('name'); ?></a></h1>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_date('','<h2>‘,’</h2>‘); ?>
<div class="post<?php the_ID(); ?>« >
<p></p>
<h3 class="storytitle"><a href="<?php the_permalink() ?> » rel= »bookmark » ><?php the_title(); ?></a></h3></p>
<p></p>
<div class="meta"><?php _e("Filed under:"); ?> | In <?php the_category(',') ?> — <?php the_tags(__('Tags: '), ', ', ' — '); ?> @<?php the_author() ?> @ <?php the_time('F j, Y on g:i a') ?>|<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div></p>
<p></p>
<div class="storycontent">
<?php the_content("Continue reading ".the_title('', '', false)."..."); ?></div></p>
<div class="feedback"><?php link_pages('<p><strong>Pages:</strong> ‘, ‘</p>‘, ‘number’); ?><?php edit_post_link('Edit', ' — ', ''); ?></div>
<!--
<?php trackback_rdf(); ?>
-->
</div>
<?php
// on essaie de reconnaitre l'extension pour que le téléchargement corresponde au type de fichier afin d'éviter les erreurs de corruptions
if(isset($_GET['Fichier_a_telecharger']))
$file = $_GET['Fichier_a_telecharger'];
elseif(isset($_POST['Fichier_a_telecharger']))
$file = $_POST['Fichier_a_telecharger'];
else
$file = '';
if(isset($_GET['chemin']))
$chemin= $_GET['chemin'];
elseif(isset($_POST['chemin']))
$chemin = $_POST['chemin'];
else
$chemin = '';
switch(strrchr(basename($file), ".")) {
case ".gz": $type = "application/x-gzip"; break;
case ".tgz": $type = "application/x-gzip"; break;
case ".zip": $type = "application/zip"; break;
case ".pdf": $type = "application/pdf"; break;
case ".png": $type = "image/png"; break;
case ".gif": $type = "image/gif"; break;
case ".jpg": $type = "image/jpeg"; break;
case ".txt": $type = "text/plain"; break;
case ".htm": $type = "text/html"; break;
case "xhtml" $type = "text/xhtml";break;
case ".html": $type = "text/html"; break;
default: $type = "application/octet-stream"; break;
}
header("Content-disposition: attachment; filename=$file");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: $type"); // Surtout ne pas enlever le n
//header("Content-Length: ".filesize("composants/" . $file));
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public");
header("Expires: 0");
//echo ("'composants/".$file."'");
//$chem = "http://olivierbaudrydesign.free.fr/wp-content/themes/Oupocreanum/Telechargement/";
$chem = "./Telechargement/";
readfile($chemin.$file);
?>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<h2 class="center">Not Found</h2>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php posts_nav_link('before=<p>&next_or_number=next’.’&nextpagelink= « next page » »&previouspagelink= « « previous page » ‘); ?>
</div>
<div id="pages">
<div class="alignleft">
<ul>
<li>
<?php
$language=<<<LANGUAGE
<ul id="menu_language">
<li><a href="/" title="lire en français" id="menu_french_inactive"><span class='off'>french</span></a></li>
<li><a href="/" title="read in english" id="menu_english_active"><span class='off'>english</span></a></li>
</ul>
LANGUAGE;
$lines = split(« n », $language);
foreach ($lines as $line) {
$current = false;
preg_match(‘/href= »([^ »]+) »/’, $line, $url);
if (substr($_SERVER[« REQUEST_URI »], 0, 5) == substr($url[1], 0, 5)) {
$line = str_replace(‘<a h', '<a id="current" h', $line);
}
echo $line."n";
}
?></li>
</ul>
<?php
$menu = <<<MENU
<ul id="menu_nav">
<li><a href="http://olivierbaudrydesign.free.fr" title="home" id="menu_home"><span class="off">home</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=7/" title="biographie" id='menu_biography'><span class="off">biographie</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=9" title="cv" id="menu_cv"><span class="off">cv</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=14/" title="workingprogress" id="menu_workingprogress"><span class="off">workingprogress</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=17/" title="randomizer" id="menu_randomizer"><span class="off">randomizer</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=20/" title="videos" id="menu_videos"><span class="off">videos</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=22/" title="photographies" id="menu_pictures"><span class="off">photographies</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=24/" title="sons" id="menu_sounds"><span class="off">sons</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=27/" title="expositions" id="menu_exhibitions"><span class="off">expositions</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=29/" title="publications" id="menu_publications"><span class="off">publications</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=31/" title="logiciels" id="menu_software"><span class="off">logiciels</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=33/" title="abstracts" id="menu_abstracts"><span class="off">abstracts</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=35/" title="machines" id="menu_machines"><span class="off">machines</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=37/" title="artistes" id="menu_artists"><span class="off">artistes</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=39/" title="bibliographie" id="menu_bibliography"><span class="off">bibliographie</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=43/" title="discographie" id="menu_discography"><span class="off">discographie</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=41/" title="webographie" id="menu_webography"><span class="off">webographie</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=45/" title="citations" id="menu_citations"><span class="off">citations</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=47/" title="lexique" id="menu_lexique"><span class="off">lexique</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=53/" title="liens" id="menu_links"><span class="off">liens</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=49/" title="forum" id="menu_forum"><span class="off">forum</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=51/" title="téléchargement" id="menu_upload"><span class="off">téléchargement</span></a></li>
<li><a href="http://olivierbaudrydesign.free.fr/?page_id=55/" title="remerciements" id="menu_thanks"><span class="off">remerciements</span></a></li>
</ul>
MENU;
$lines = split(« n », $menu);
foreach ($lines as $line) {
$current = false;
preg_match(‘/href= »([^ »]+) »/’, $line, $url);
if (substr($_SERVER[« REQUEST_URI »], 0, 5) == substr($url[1], 0, 5)) {
$line = str_replace(‘<a h', '<a id="current" h', $line);
}
echo $line."n";
}
?>
</ul>
<div id="search">
<form action="<?php echo $_SERVER['PHP_SELF']; ?> » method= »get » name= »searchform » id= »searchform »>
<input type="text" name="s" id="s" size="13" value="Rechercher..." onfocus="this.value=''" style="text-align: center" onblur="this.value='Rechercher...'" />
<input type="image" alt="submit" src="/wp-content/themes/Oupocreanum/images/return.gif" />
</form>
</div>
</div>
<!-- end header -->
<?php get_footer(); ?></body></html> -
AuteurMessages
Affichage de 1 message (sur 1 au total)
- Le forum ‘Utilisation spécifique de WordPress’ est fermé à de nouveaux sujets et réponses.