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

EDI, CMS, Outils, Scripts et API PHP Discussion :

Warning: Sablotron error on line 41: wrong expression syntax


Sujet :

EDI, CMS, Outils, Scripts et API PHP

  1. #1
    Membre régulier Avatar de moonia
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    283
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 283
    Points : 82
    Points
    82
    Par défaut Warning: Sablotron error on line 41: wrong expression syntax
    c'est encore moi , je n'ai pas encore resolu le pb de mon erreure , voici le code ( noté que ce code marche très bien sur easyphp1.6 alors que sur easyphp1.8 j'ai l'erreur suivante :

    Warning: Sablotron error on line 41: wrong expression syntax in c:\program files\easyphp1-8\www\odam\class\class_xslt.php on line 99
    Erreur : wrong expression syntax )
    le code est :
    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
    <?php
     
    // ##################################################################################
    // How to use it:
    // include_once("class_xslt.php");
    // $xslt=new Xslt();
    // $xslt->setXml("applications.xml"); // or setXmlString($xml)
    // $xslt->setXsl("tr1.xsl");          // or setXslString($xsl)
    // if($xslt->transform()) {
    //    $ret=$xslt->getOutput();
    //    echo $ret;
    // } else {
    //    print("Error:".$xslt->getError());
    // }
    // ##################################################################################
     
    // CHECK FOR DOUBLE DEFINITION HERE
    if(defined("_class_xslt_is_included")) {
      // do nothing since the class is already included  
    } else {
      define("_class_xslt_is_included",1); 
     
    class Xslt { 
       var $xsl, $xml, $output, $error ; 
     
       /* Constructor */ 
       function xslt() { 
          $this->processor = xslt_create(); 
    	  return ($this->processor);
       } 
     
       /* Destructor */ 
       function destroy() { 
          xslt_free($this->processor); 
       } 
     
       /* output methods */ 
       function setOutput($string) { 
          $this->output = $string; 
       } 
     
       function getOutput() { 
          return $this->output; 
       } 
     
       /* set methods */
       function setXmlString($xml) {
          $this->xml=$xml;
          return true;
       }
     
       function setXslString($xsl) {
          $this->xsl=$xsl;
          return true;
       }
     
       function setXml($uri) {
          if($doc = new docReader($uri)) { 
             $this->xml = $doc->getString(); 
             return true; 
          } else { 
             $this->setError("Could not open $xml"); 
             return false; 
          } 
       } 
     
       function setXsl($uri) { 
          if($doc = new docReader($uri)) { 
             $this->xsl = $doc->getString(); 
             return true; 
          } else { 
             $this->setError("Could not open $uri"); 
             return false; 
          } 
       } 
     
       /* transform method */ 
     
       function transform() {
          $arguments = array(
               '/_xml' => $this->xml,
               '/_xsl' => $this->xsl
          );
     
          $ret = xslt_process($this->processor, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
          if(!$ret) {
            $this->setError(xslt_error($this->processor));
    	return false;
          } else {
            $this->setOutput($ret); 
    	return true;
          }
     
       } 
     
       /* Error Handling */ 
       function setError($string) { 
          $this->error = $string; 
       } 
     
       function getError() { 
          return $this->error; 
       } 
    } 
     
     
     
    /* docReader -- read a file or URL as a string */ 
    /* test */ 
    /* 
       $docUri = new docReader('http://www.someurl.com/doc.html'); 
       echo $docUri->getString(); 
    */ 
    class docReader { 
       var $string; // public string representation of file 
       var $type; // private URI type: 'file','url' 
       var $bignum = 1000000;
       var $uri; 
       /* public constructor */ 
       function docReader($uri) { // returns integer      $this->setUri($uri); 
          $this->uri=$uri;
          $this->setType(); 
          $fp = fopen($this->getUri(),"r"); 
          if($fp) { // get length 
             if ($this->getType() == 'file') { 
                $length = filesize($this->getUri()); 
             } else { 
                $length = $this->bignum; 
             } 
          $this->setString(fread($fp,$length)); 
             return 1; 
          } else { 
             return 0; 
          } 
       } 
       /* determine if a URI is a filename or URL */ 
       function isFile($uri) { // returns boolean
          if (strstr($uri,'http://') == $uri) { 
             return false; 
          } else { 
             return true; 
          } 
       } 
       /* set and get methods */ 
       function setUri($string) { 
          $this->uri = $string; 
       } 
       function getUri() { 
          return $this->uri; 
       } 
       function setString($string) { 
          $this->string = $string; 
       } 
       function getString() { 
          return $this->string; 
       } 
       function setType() { 
          if ($this->isFile($this->uri)) { 
             $this->type = 'file';
          } else { 
             $this->type = 'url';
          } 
       } 
       function getType() { 
          return $this->type; 
       } 
    } 
     
     
    }
    ?>
    Aider moi

  2. #2
    NoT
    NoT est déconnecté
    Membre actif
    Profil pro
    Inscrit en
    Février 2004
    Messages
    237
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 237
    Points : 280
    Points
    280
    Par défaut
    C'est un warning

    Ce qui signifie qu'il ne met pas en péril l'éxécution de ton code, simplement il t'averti qu'il y a qqch qui n'est pas très correct, mais il n'arrête pas l'exécution du code, contrairement à un Fatal Error.

    PHP gère différent niveau d'erreur et visiblement les 2 version d'easyphp n'ont pas la même configuration du niveau d'erreur, tu peux régler ce niveau d'erreur dans php.ini ( dans le repertoire windows pour easyphp 1.6 et dans le repertoire apache pour easyphp 1.8 )

    Je connais pu la lignr exacte et là je peux pas la vérifier, mais ça doit etre un truc du genre display_error , qui doit pas etre régler de la même manière sur tes 2 easyphp. Il te reste pu qu'à faire un copier coller de l'un vers l'autre

  3. #3
    Membre éprouvé Avatar de macbook
    Inscrit en
    Février 2006
    Messages
    838
    Détails du profil
    Informations forums :
    Inscription : Février 2006
    Messages : 838
    Points : 1 009
    Points
    1 009
    Par défaut
    Et c'est encore un multipost...
    Consultant idéaliste.

  4. #4
    Membre régulier Avatar de moonia
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    283
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 283
    Points : 82
    Points
    82
    Par défaut
    merci pour l'idée je vais essayer de le faire des mnt et voir si ca donne des résultats , mais il faut noter que mon application ne marche plus avec ce warning

    PS: c'est koi un mutipost ??????!

Discussions similaires

  1. [VS2003] set warning as error
    Par fally dans le forum C#
    Réponses: 2
    Dernier message: 20/02/2008, 17h40
  2. [ASE12] mess. erreur : WARNING - Fatal Error 644 occurred at Sep 21 2007 10:27PM.
    Par padraig29 dans le forum Adaptive Server Enterprise
    Réponses: 2
    Dernier message: 28/09/2007, 16h08
  3. [Smarty] error in line 1088
    Par lifeisgood dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 26/11/2006, 10h34
  4. Réponses: 1
    Dernier message: 09/06/2006, 17h06
  5. API jackcess-1.1.3 error class file has wrong version 49.0
    Par dalio2579 dans le forum API standards et tierces
    Réponses: 2
    Dernier message: 22/03/2006, 00h38

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