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 :

Fatal error: Class 'PDO ' not found in C:\wamp64\\PrTz\db.class.php on line 40


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2017
    Messages
    38
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2017
    Messages : 38
    Par défaut Fatal error: Class 'PDO ' not found in C:\wamp64\\PrTz\db.class.php on line 40
    Bonjour, AYANT appris les bases du Php, j'ai suivi un tuto qui avait pour but de reproduire un site ecommerce.
    Je n'ai pas l'impression que mon code PHP fonctionne. Cela fait 3 jours que je cherche; en vain.

    Dans un premier temps, je mettrai la class db.class.php où se situe l'erreur puis l’intégralité du code.
    Merci d'avance.


    DB.CLASS.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
    <?php
    class DB{
    	private $host='localhost';
    	private $username='root';
    	private $password='';
    	private $database='tuto';
    	private $db;
     
    	public function __construct ($host=null,$username=null,$password=null,$database=null){
    		if($host!=null){
    			$this->host= $localhost;
    			$this->username= $username;
    			$this->password= $password;
    			$this->database=$database;
     
     
     
     
    		}
     
    try{
     
    	$this->db= new PDO('mysql:host='.$this->host. ';dbname='.$this->database,$this->username, $this->password, array(PDO::MYSQL_ATTR_INIT_COMMAND  =>'SET NAMES UTF8',
    		PDO::ATTR_ERRMODE=> PDO:: ERRMODE_WARNING
     
    ));
    }catch(PDOException $e){
     
    	die('<h1>Impossible de se connecter à la base de donnée</h1>');
    }
     
     
     
    	}
     
     
    public function query($sql){
    $reg= $this->db->prepare($sql);
    $reg->execute();
    return $reg->fetchAll(PDO*:: FETCH_OBJ);
     
    } }

    CLASS HEADER.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
    <?php require'db.class.php';
    $DB=new DB();  
    ?><!DOCTYPE html>
    <html>
    <head>
    	<title>Ecommerce template</title>
    	<meta charset="utf-8">
    	<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8">
    </head>
     
    <body>
     
    <div id="header">
    	<div class="wrap">
    		<div class="menu">
    				<a href="#" class="logo">Shoppi</a>
    				<h1>The best online store, for real.</h1>
    				<ul class="panier">
    					<li class="caddie"><a href="#">Caddie</a></li>
    					<li class="items">
    						ITEMS
    						<span>13</span>
    					</li>
    					<li class="total">
    						TOTAL
    						<span>1320.09 €</span>
    					</li>
    				</ul>
    		</div>
    	</div>
    </div>
     
    <div id="subheader">
    	<div class="wrap">
    		<h2>Welcome visitor you can <a href="#">login</a> or <a href="#">create an account</a> .</h2>
    	</div>
    </div>
     
     
    <div id="wrap">
     
    	<div id="menu">
    		<ul class="wrap">
    			<li> <a href="#">All Categories</a> </li>
    			<li> <a href="#">Electronics</a> </li>
    			<li> <a href="#">Fashion</a> </li>
    			<li> <a href="#">Entertainement</a> </li>
    			<li> <a href="#">Motors</a> </li>
    			<li> <a href="#">Outdoors</a> </li>
    			<li> <a href="#">Gift</a> </li>
    			<li> <a href="#">Jewelry</a> </li>
    			<li> <a href="#">Shoes</a> </li>
    			<li> <a href="#">Computers</a> </li>
    		</ul>
    	</div>
    	<div id="ariane">
    		<div class="wrap">		You are right here : Home » <a href="#">Electronics</a>
    		</div>
    		<div id="main" class="clearfix">
     
    	</div>

    CLASS INDEX.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
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    <?php require "header.php";?>
     
     
     
     
    		<div class="home">
    			<div class="row">
    				<div class="wrap">
    					<?php $products= $DB->query('SELECT * FROM products');?>
    					<div class="box">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="add" href="#">
    								add
    							</a>
    						</div>
    					</div>
    					<div class="box">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="add" href="#">
    								add
    							</a>
    						</div>
    					</div>
    					<div class="box last">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="add" href="#">
    								add
    							</a>
    						</div>
    					</div>
    				</div>
    			</div>
    			<div class="row last">
    				<div class="wrap">
    					<div class="box">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="valid" href="#">
    								add
    							</a>
    						</div>
    					</div>
    					<div class="box">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="add" href="#">
    								add
    							</a>
    						</div>
    					</div>
    					<div class="box last">
    						<div class="product full">
    							<a href="#">
    								<img src="stylesheets/img/image.png">
    							</a>
    							<div class="description">
    								Apple, <strong>Ipad :</strong>
    								<a href="#" class="price">1500,00 €</a>
    							</div>
    							<a href="#" class="gift">
    								Gift
    							</a>
    							<div class="rating">
    								<span>Rating :</span>
    								<ul>
    									<li><a href="#">1</a></li>
    									<li><a href="#">2</a></li>
    									<li><a href="#">3</a></li>
    									<li><a href="#">4</a></li>
    									<li><a href="#" class="off">5</a></li>
    								</ul>
    							</div>
    							<a class="add" href="#">
    								add
    							</a>
    						</div>
    					</div>
    				</div>
    			</div>
    		</div>
    		<div id="pagination">
    			<ul class="wrap">
    				<li><a href="#"> Prev </a></li>
    				<li class="page"> Page : <a href="#">2</a> of 3</li>
    				<li><a href="#"> Next</a></li>
    			</ul>
    		</div>
    	<?php require "footer.php"; ?>  
    <?php require 'footer.php';?>
    CLASS FOOTER.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
    </div>
    </div>
     
    <div id="footer">
    <div class="wrap">
    <p>© Shoppi, a small ecommerce template • Handcrafted by Jeremy Jones / @jeijones</p>
    </div>
    </div>
     
     
     
    </body>
     
    </html>

    CLASS DB.CLASS.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
    <?php
    class DB{
    	private $host='localhost';
    	private $username='root';
    	private $password='';
    	private $database='tuto';
    	private $db;
     
    	public function __construct ($host=null,$username=null,$password=null,$database=null){
    		if($host!=null){
    			$this->host= $localhost;
    			$this->username= $username;
    			$this->password= $password;
    			$this->database=$database;
     
     
     
     
    		}
     
    try{
     
    	$this->db= new PDO('mysql:host='.$this->host. ';dbname='.$this->database,$this->username, $this->password, array(PDO::MYSQL_ATTR_INIT_COMMAND  =>'SET NAMES UTF8',
    		PDO::ATTR_ERRMODE=> PDO:: ERRMODE_WARNING
     
    ));
    }catch(PDOException $e){
     
    	die('<h1>Impossible de se connecter à la base de donnée</h1>');
    }
     
     
     
    	}
     
     
    public function query($sql){
    $reg= $this->db->prepare($sql);
    $reg->execute();
    return $reg->fetchAll(PDO*:: FETCH_OBJ);
     
    } }

    STYLE CSS
    Code CSS : 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
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,
    article, aside, canvas, details, embed,
    figure, figcaption, footer, header, hgroup,
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
      margin: 0;
      padding: 0;
      border: 0;
      font-size: 100%;
      font: inherit;
      vertical-align: baseline; }
     
    body {
      line-height: 1; }
     
    ol, ul {
      list-style: none; }
     
    table {
      border-collapse: collapse;
      border-spacing: 0; }
     
    caption, th, td {
      text-align: left;
      font-weight: normal;
      vertical-align: middle; }
     
    q, blockquote {
      quotes: none; }
      q:before, q:after, blockquote:before, blockquote:after {
        content: "";
        content: none; }
     
    a img {
      border: none; }
     
    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
      display: block; }
     
    .wrap {
      width: 980px;
      margin: 0 auto; }
     
    #header {
      background: url("img/bg-header.png") repeat;
      height: 72px; }
      #header div.menu {
        background: url("img/bg-header-menu.png") no-repeat;
        height: 72px;
        line-height: 72px; }
        #header div.menu a.logo {
          width: 98px;
          display: block;
          font-family: 'AllerRegular';
          font-size: 24px;
          color: #FFF;
          text-decoration: none;
          text-align: center;
          float: left;
          text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8); }
        #header div.menu h1 {
          font-family: 'AllerLightRegular';
          font-size: 14px;
          color: #FFF;
          font-style: italic;
          font-weight: 300;
          padding-left: 20px;
          float: left;
          width: 200px;
          text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8); }
        #header div.menu ul.panier {
          float: left;
          width: 261px;
          margin-left: 397px; }
          #header div.menu ul.panier li.caddie {
            float: left; }
          #header div.menu ul.panier li.caddie a {
            background: url("img/caddie.png") no-repeat;
            width: 31px;
            height: 27px;
            display: block;
            text-indent: -9898px;
            line-height: 72px;
            margin-top: 20px;
            margin-left: 18px; }
          #header div.menu ul.panier li.items {
            float: left;
            height: 72px;
            line-height: 30px;
            margin-left: 12px;
            font-family: 'Helvetica';
            font-size: 11px;
            color: #aad56b;
            text-align: center;
            width: 65px;
            display: block;
            text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); }
            #header div.menu ul.panier li.items span {
              display: block;
              margin-top: 5px;
              font-size: 18px;
              color: #FFF;
              font-weight: bold;
              text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); }
          #header div.menu ul.panier li.total {
            float: left;
            height: 72px;
            line-height: 30px;
            margin-left: 12px;
            font-family: 'Helvetica';
            font-size: 11px;
            color: #aad56b;
            text-align: center;
            width: 110px;
            display: block;
            text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); }
            #header div.menu ul.panier li.total > span {
              display: block;
              margin-top: 5px;
              font-size: 18px;
              color: #FFF;
              font-weight: bold;
              text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); }
     
    #subheader {
      background: url("img/bg-subheader.png") repeat;
      height: 45px; }
      #subheader div.wrap h2 {
        font-family: 'AllerRegular';
        font-size: 12px;
        color: #FFF;
        line-height: 45px;
        text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); }
        #subheader div.wrap h2 a {
          color: #99cd4e;
          text-decoration: none; }
     
    #menu {
      background: #FFF;
      height: 38px;
      padding-top: 25px; }
      #menu li {
        float: left;
        text-decoration: none;
        margin-right: 35px; }
        #menu li a {
          font-family: 'AllerBold';
          font-size: 14px;
          color: #4d5662;
          text-decoration: none;
          text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8); }
        #menu li a:hover {
          color: #ec8a64; }
     
    #ariane {
      background: #FFF;
      font-family: 'AllerLightRegular';
      font-size: 10px;
      color: #919aa8;
      padding-bottom: 15px; }
      #ariane a {
        color: #323b49; }
     
    /*
    HOME
    */
    .home {
      background: #f9f9f9; }
      .home .row.last {
        border-top: 0 none; }
      .home .row {
        border-top: 1px solid #e5e6e7;
        border-bottom: 1px solid #e5e6e7;
        height: 410px; }
        .home .row .box.last {
          border-right: 1px solid #e5e6e7; }
        .home .row .box {
          width: 300px;
          height: 380px;
          border-left: 1px solid #e5e6e7;
          padding-top: 30px;
          padding-left: 25px;
          float: left; }
          .home .row .box .product:hover {
            -webkit-box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.2);
            -moz-box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.2);
            box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.2); }
          .home .row .box .product {
            background: url("img/boxfull.png") no-repeat;
            width: 263px;
            height: 340px;
            position: relative;
            -webkit-transition-property: background;
            -moz-transition-property: background;
            -ms-transition-property: background;
            -o-transition-property: background;
            transition-property: background;
            -webkit-transition-duration: 2s;
            -moz-transition-duration: 2s;
            -ms-transition-duration: 2s;
            -o-transition-duration: 2s;
            transition-duration: 2s;
            -webkit-transition-delay: 2s;
            -moz-transition-delay: 2s;
            -ms-transition-delay: 2s;
            -o-transition-delay: 2s;
            transition-delay: 2s; }
            .home .row .box .product a img {
              margin-left: 1px;
              margin-top: 1px; }
            .home .row .box .product .description {
              font-family: 'AllerLightRegular';
              font-size: 16px;
              color: #39414d;
              font-style: italic;
              text-align: center;
              padding-top: 8px;
              text-shadow: 1px 1px 1px white; }
              .home .row .box .product .description strong {
                font-family: 'AllerRegular';
                font-style: normal; }
              .home .row .box .product .description a.price {
                font-family: 'Helvetica';
                font-size: 18px;
                color: #74bc0e;
                font-weight: bold;
                font-style: normal;
                text-decoration: none; }
            .home .row .box .product a.gift {
              background: url("img/gift.png") no-repeat;
              display: block;
              width: 17px;
              height: 17px;
              text-indent: -9898px;
              position: absolute;
              bottom: 14px;
              left: 15px; }
            .home .row .box .product .rating {
              position: absolute;
              bottom: 7px;
              left: 65px; }
              .home .row .box .product .rating span {
                font-family: 'Helvetica';
                font-size: 13px;
                color: #39414d;
                font-weight: 300;
                display: block;
                width: 48px;
                height: 20px;
                float: left; }
              .home .row .box .product .rating ul {
                float: left;
                display: block;
                width: 115px; }
                .home .row .box .product .rating ul li {
                  float: left;
                  margin-right: 2px; }
                  .home .row .box .product .rating ul li a {
                    background: url("img/rating.png") no-repeat;
                    width: 15px;
                    height: 15px;
                    display: block;
                    text-indent: -9898px;
                    background-position: 0 0; }
                  .home .row .box .product .rating ul li a:hover, .home .row .box .product .rating ul li a.off {
                    background: url("img/rating.png") no-repeat;
                    width: 15px;
                    height: 15px;
                    display: block;
                    text-indent: -9898px;
                    background-position: -15px 0; }
            .home .row .box .product .add {
              background: url("img/sprites.png") no-repeat;
              background-position: 0 0;
              width: 43px;
              height: 44px;
              display: block;
              text-indent: -9898px;
              position: absolute;
              bottom: 25px;
              right: -13px;
              -webkit-transition: opacity 0.2s ease-in; }
            .home .row .box .product .add:hover {
              background: url("img/sprites.png") no-repeat;
              background-position: 0 0;
              width: 43px;
              height: 44px;
              display: block;
              text-indent: -9898px;
              position: absolute;
              bottom: 25px;
              right: -13px;
              opacity: 0.7;
              -moz-opacity: 0.7;
              filter: alpha(opacity=7); }
            .home .row .box .product .valid {
              background: url("img/sprites.png") no-repeat;
              background-position: 0 -45px;
              width: 43px;
              height: 44px;
              display: block;
              text-indent: -9898px;
              position: absolute;
              bottom: 25px;
              right: -13px;
              -webkit-transition: opacity 0.2s ease-in; }
            .home .row .box .product .valid:hover {
              background: url("img/sprites.png") no-repeat;
              background-position: 0 -90px;
              width: 43px;
              height: 44px;
              display: block;
              text-indent: -9898px;
              position: absolute;
              bottom: 25px;
              right: -13px;
              opacity: 0.9;
              -moz-opacity: 0.9;
              filter: alpha(opacity=9); }
     
    /*
    REGISTER
    */
    .register .title {
      background: #F9F9F9;
      height: 80px;
      border-top: 1px solid #e5e6e7;
      border-bottom: 1px solid #e5e6e7; }
      .register .title h2 {
        height: 80px;
        line-height: 80px;
        font-family: 'AllerRegular';
        font-size: 30px;
        color: #323b49;
        width: 464px;
        float: left;
        padding-left: 51px;
        text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8); }
      .register .title h2.first {
        border-right: 1px solid #e5e6e7;
        padding-left: 0px; }
    .register .bloc {
      background: #FFF;
      height: 458px;
      border-bottom: 1px solid #e5e6e7; }
      .register .bloc .customer {
        width: 464px;
        float: left;
        border-right: 1px solid #e5e6e7;
        height: 458px; }
        .register .bloc .customer h3 {
          font-family: 'AllerRegular';
          font-size: 13px;
          line-height: 22px;
          color: #323b49;
          padding: 10px 0 10px 0;
          border-bottom: 1px solid #e5e6e7;
          width: 420px; }
        .register .bloc .customer form {
          padding-bottom: 15px;
          border-bottom: 1px solid #e5e6e7;
          width: 420px; }
          .register .bloc .customer form .input {
            padding: 10px 0 10px 0; }
            .register .bloc .customer form .input label {
              font-family: 'AllerLightRegular';
              font-size: 12px;
              line-height: 22px;
              color: #323b49;
              display: block; }
            .register .bloc .customer form .input input {
              height: 33px;
              width: 200px;
              border: 1px solid #c3c3c3;
              background: #f9f9f9; }
          .register .bloc .customer form .submit input {
            background: url("img/submit.png") no-repeat;
            background-position: 0 0;
            width: 142px;
            height: 39px;
            border: 0 none;
            color: #FFF;
            font-family: 'AllerRegular';
            text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
            cursor: pointer; }
          .register .bloc .customer form .submit input:hover {
            background: url("img/submit.png") no-repeat;
            background-position: 0 -42px; }
      .register .bloc .login {
        float: left;
        padding-left: 51px; }
        .register .bloc .login form {
          padding-bottom: 15px;
          border-bottom: 1px solid #e5e6e7;
          width: 420px; }
          .register .bloc .login form .input {
            padding: 10px 0 10px 0; }
            .register .bloc .login form .input label {
              font-family: 'AllerLightRegular';
              font-size: 12px;
              line-height: 22px;
              color: #323b49;
              display: block; }
            .register .bloc .login form .input input {
              height: 33px;
              width: 200px;
              border: 1px solid #c3c3c3;
              background: #f9f9f9; }
          .register .bloc .login form .submit input {
            background: url("img/submit.png") no-repeat;
            background-position: 0 0;
            width: 142px;
            height: 39px;
            border: 0 none;
            color: #FFF;
            font-family: 'AllerRegular';
            text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
            cursor: pointer; }
          .register .bloc .login form .submit input:hover {
            background: url("img/submit.png") no-repeat;
            background-position: 0 -42px; }
     
    /*
    CHECKOUT
    */
    .checkout .proceed, .checkout input[type=submit] {
      border: none;
      background: url("img/proceed.png") no-repeat;
      background-position: 0 0;
      width: 177px;
      height: 47px;
      display: block;
      float: right;
      text-align: center;
      text-decoration: none;
      line-height: 47px;
      color: #FFF;
      font-family: 'AllerRegular';
      font-size: 16px;
      text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
      margin-top: 15px; }
    .checkout .proceed:hover, .checkout input[type=submit] {
      background-position: 0 -49px; }
    .checkout .title {
      height: 80px;
      border-top: 1px solid #e5e6e7;
      border-bottom: 1px solid #e5e6e7; }
      .checkout .title h2 {
        height: 80px;
        line-height: 80px;
        font-family: 'AllerRegular';
        font-size: 30px;
        color: #323b49;
        width: 464px;
        float: left;
        text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8); }
    .checkout .table {
      background: #FFF;
      border-bottom: 1px solid #e5e6e7; }
      .checkout .table .rowtitle {
        height: 37px;
        line-height: 37px;
        border-bottom: 1px solid #e5e6e7;
        border-left: 1px solid #e5e6e7;
        padding-left: 170px;
        font-family: 'AllerBold';
        color: #323b49;
        font-size: 14px;
        text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8); }
        .checkout .table .rowtitle span {
          float: left; }
        .checkout .table .rowtitle span.name {
          width: 338px;
          display: block; }
        .checkout .table .rowtitle span.price {
          width: 130px;
          display: block; }
        .checkout .table .rowtitle span.quantity {
          width: 130px;
          display: block; }
        .checkout .table .rowtitle span.subtotal {
          width: 130px;
          display: block; }
        .checkout .table .rowtitle span.action {
          width: 79px;
          display: block;
          border-right: 1px solid #e5e6e7;
          border-left: 1px solid #e5e6e7;
          text-align: center; }
      .checkout .table .row.grey {
        background: #fcfcfc; }
      .checkout .table .row {
        overflow: hidden;
        background: #FFF;
        height: 81px;
        line-height: 81px;
        border-bottom: 1px solid #e5e6e7;
        border-left: 1px solid #e5e6e7; }
        .checkout .table .row a.img {
          width: 168px;
          margin-top: 15px;
          display: block;
          float: left;
          text-align: center; }
        .checkout .table .row span {
          float: left;
          font-family: 'AllerRegular';
          font-size: 12px;
          color: #78c04f;
          text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8); }
        .checkout .table .row span.name {
          width: 340px;
          display: block; }
        .checkout .table .row span.price {
          width: 130px;
          display: block; }
        .checkout .table .row span.quantity {
          width: 57px;
          display: block;
          text-align: center;
          padding-right: 73px; }
          .checkout .table .row span.quantity input {
            height: 33px;
            width: 20px;
            border: 1px solid #c3c3c3;
            background: #f9f9f9; }
        .checkout .table .row span.subtotal {
          width: 130px;
          display: block; }
        .checkout .table .row span.action {
          width: 79px;
          display: block;
          border-right: 1px solid #e5e6e7;
          border-left: 1px solid #e5e6e7;
          text-align: center; }
      .checkout .table .rowtotal {
        height: 57px;
        line-height: 57px;
        border-right: 1px solid #e5e6e7;
        border-left: 1px solid #e5e6e7;
        font-family: 'AllerLightRegular';
        color: #323b49;
        font-size: 16px;
        text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
        padding-left: 796px; }
        .checkout .table .rowtotal .total {
          text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
          font-family: 'AllerBold';
          color: #323b49;
          font-size: 16px; }
     
    /*
    PAGINATION
    */
    #pagination {
      background: #FFF;
      height: 40px;
      line-height: 40px;
      border-bottom: 1px solid #e5e6e7; }
      #pagination ul li.page {
        width: 80px;
        border-left: 1px solid #e5e6e7;
        border-right: 1px solid #e5e6e7;
        text-align: center;
        margin-right: 20px; }
        #pagination ul li.page a {
          font-family: 'AllerBold'; }
      #pagination ul li {
        float: left;
        font-family: 'AllerLightRegular';
        font-size: 11px;
        color: #919aa8;
        width: 40px; }
        #pagination ul li a {
          font-family: 'AllerLightRegular';
          font-size: 11px;
          color: #919aa8;
          text-decoration: none;
          width: 40px; }
     
    /*
    Sticky
    */
    * {
      margin: 0;
      padding: 0; }
     
    html, body {
      height: 100%; }
     
    #wrap {
      min-height: 100%;
      background: #F9F9F9; }
     
    #main {
      overflow: auto;
      padding-bottom: 57px; }
     
    /* must be same height as the footer */
    #footer {
      position: relative;
      margin-top: -57px;
      /* negative value of footer height */
      height: 57px;
      clear: both;
      background: url("img/footer.png") repeat; }
      #footer p, #footer a {
        line-height: 57px;
        font-family: 'AllerRegular';
        font-size: 12px;
        color: #FFF;
        text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8); }
     
    /*Opera Fix*/
    body:before {
      /* thanks to Maleika (Kohoutec)*/
      content: "";
      height: 100%;
      float: left;
      width: 0;
      margin-top: -32767px;
      /* thank you Erik J - negate effect of float*/ }
     
    @font-face {
      font-family: 'AllerLightRegular';
      src: url("fonts/AllerLight/aller_lt-webfont.eot");
      src: url("fonts/AllerLight/aller_lt-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/AllerLight/aller_lt-webfont.woff") format("woff"), url("fonts/AllerLight/aller_lt-webfont.ttf") format("truetype"), url("fonts/AllerLight/aller_lt-webfont.svg#AllerLightRegular") format("svg");
      font-weight: normal;
      font-style: normal; }
     
    @font-face {
      font-family: 'AllerRegular';
      src: url("fonts/AllerRegular/aller_rg-webfont.eot");
      src: url("fonts/AllerRegular/aller_rg-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/AllerRegular/aller_rg-webfont.woff") format("woff"), url("fonts/AllerRegular/aller_rg-webfont.ttf") format("truetype"), url("fonts/AllerRegular/aller_rg-webfont.svg#AllerRegular") format("svg");
      font-weight: normal;
      font-style: normal; }
     
    @font-face {
      font-family: 'AllerBold';
      src: url("fonts/AllerBold/aller_bd-webfont.eot");
      src: url("fonts/AllerBold/aller_bd-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/AllerBold/aller_bd-webfont.woff") format("woff"), url("fonts/AllerBold/aller_bd-webfont.ttf") format("truetype"), url("fonts/AllerBold/aller_bd-webfont.svg#AllerBold") format("svg");
      font-weight: normal;
      font-style: normal; }

    Merci d'avance.

  2. #2
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Novembre 2016
    Messages
    74
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2016
    Messages : 74
    Par défaut
    Bonjour, je ne sais pas si j'ai bien compris la situation

    mais je vois un * dans la ligne 40 qui n'est pas utile
    return $reg->fetchAll(PDO*:: FETCH_OBJ);

    De plus j'ai l'habitude d'importer la Class PDO en ajoutant use \PDO en haut de ma classe (lorsque je travaille avec PDO)

  3. #3
    Membre Expert
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 493
    Billets dans le blog
    1
    Par défaut
    La remarque de Younes2727 explique ton bug.

    En outre, je t'invite à utiliser la classe PDOPlusPlus. Elle simplifie l'utilisation de PDO. Un vrai plaisir...

  4. #4
    Membre averti
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2017
    Messages
    38
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2017
    Messages : 38
    Par défaut
    Merci beaucoup pour votre aide.

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

Discussions similaires

  1. [1.x] Fatal error: Class 'PDO' not found in...
    Par Bizoo dans le forum Débuter
    Réponses: 2
    Dernier message: 30/11/2010, 21h13
  2. [1.x] Fatal error: Class 'PDO' not found
    Par phpiste dans le forum Symfony
    Réponses: 5
    Dernier message: 14/07/2010, 12h40
  3. Fatal error: Class SoapServer not found in
    Par l.laurent60 dans le forum XML/XSL et SOAP
    Réponses: 8
    Dernier message: 21/05/2009, 10h12
  4. Fatal error class not found.
    Par billyrose dans le forum Langage
    Réponses: 4
    Dernier message: 23/04/2009, 17h22
  5. [MySQL] Fatal error: Class 'mysqli' not found in site
    Par rashid120 dans le forum PHP & Base de données
    Réponses: 1
    Dernier message: 29/07/2008, 08h42

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