IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Probleme CSS ne s'applique pas avec require


Sujet :

Langage PHP

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    4
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 27
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mars 2017
    Messages : 4
    Points : 7
    Points
    7
    Par défaut Probleme CSS ne s'applique pas avec require
    Bonjour , je suis entrain d'utiliser le modele MVC pour creer un site e-commerce . alors , dans le controlleur j'ai fais une require_once pour le fichier vue de l affichage.Mais quand je clique du home pour afficher la page de l'affichage le css ne s'applique pas.quand j'ouvre le fichier d'affichage seul le css marche trés bien. Une solution svp ?
    lien du Home.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
     <li><a href="controller\produitcontroller.php?action=afficher"><i class="icon icon-th"></i> <span>Tables</span></a></li>
    controller.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    else if ($action=='afficher')
    { 
     
    	$prods=produit::affichertout($conn);
    	require('C:\wamp\www\AtelierPHP\sitegestionstock\vue\afficherproduits.php');
     
    }
    vueafficher.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
     
    <div id="content">
      <div id="content-header">
        <div id="breadcrumb"> <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <a href="#" class="current">Tables</a> </div>
        <h1>Tables</h1>
      </div>
      <div class="container-fluid">
        <hr>
        <div class="row-fluid">
          <div class="span12">
            <div class="widget-box">
              <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
     
                <h5>Data table</h5>
              </div>
              <div class="widget-content nopadding">
                <table class="table table-bordered data-table">
                  <thead>
                    <tr>
                      <th>ID</th>
                      <th>Nom</th>
                      <th>Marque</th>
                      <th>Prix</th>
                      <th>Description</th>
                      <th>tva</th>
                      <th>Date</th>
                      <th>Categorie</th>
                    </tr>
                  </thead>
     
                  <tbody>
                    <?php
      foreach ($prods as $l){
        ?>
     
        <tr>
     
     
      </tr>
      <tr>
      <td><?php echo $l['ID'] ?> 
      </td>
      <td><?php echo $l['Nom'] ?></td>
      <td><?php echo $l['Marque'] ?></td>
      <td><?php echo $l['Prix'] ?></td>
      <td><?php echo $l['Description'] ?></td>
      <td><?php echo $l['TVA'] ?></td>
      <td><?php echo $l['Date'] ?></td>
      <td><?php echo $l['Categories_nom'] ?></td>
     
      <form method="POST" action="produitcontroller.php?action=modifierprod">
    <?php echo "<td><input type=button value=Modifier onclick=location='produitcontroller.php?action=modifierprod&ref=".$l["ID"]."'></td>";?>
     
      </form>
     
     
      <form method="POST" action="produitcontroller.php?action=supprimerprod">
      <?php echo "<td><input type=button value=Supprimer onclick=location='produitcontroller.php?action=supprimerprod&ref=".$l["ID"]."'></td>";?>
     
     
      </form>
     
      <?php echo "<td><input type=button value=afficherechantillons onclick=location='caracteristiquescontroller.php?action=affichercarac&refe=".$l["ID"]."'></td>";?>
        <?php echo "<td><input type=button value=ajouterechantillon onclick=location='caracteristiquescontroller.php?action=ajoutercara&refe=".$l["ID"]."'></td>";?>
     
    </tr>
    appel du css dans vueaffichage.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
     
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Matrix Admin</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="css/uniform.css" />
    <link rel="stylesheet" href="css/select2.css" />
    <link rel="stylesheet" href="css/matrix-style.css" />
    <link rel="stylesheet" href="css/matrix-media.css" />
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
    </head>
    <body>

  2. #2
    Membre éclairé Avatar de Geoffrey74
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2007
    Messages
    515
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2007
    Messages : 515
    Points : 760
    Points
    760
    Par défaut
    Salut,

    affiche la source du code source généré sur la page où ça ne fonctionne pas.

    Tu verra alors les liens vers les css.
    Clique sur l'un d'eux, tu aura l'URL réelle utilisée pour les charger, et tu saura pourquoi ça marche pas.

  3. #3
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    4
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 27
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mars 2017
    Messages : 4
    Points : 7
    Points
    7
    Par défaut
    a oui merci beaucoup !

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [SGBD] Probleme menu css /php / mysql / javascript
    Par vincedjs dans le forum Administration
    Réponses: 14
    Dernier message: 21/02/2006, 17h51
  2. Probleme Php et Mysql
    Par lemagicien dans le forum Requêtes
    Réponses: 13
    Dernier message: 18/10/2005, 14h09
  3. Probleme avec CSS
    Par Rychi dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 16/03/2005, 18h26
  4. Probleme xhtml/css
    Par tooms2028 dans le forum Mise en page CSS
    Réponses: 3
    Dernier message: 19/01/2005, 09h41
  5. probleme php/posgresql
    Par voyageur dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 06/11/2004, 20h58

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo