Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1163 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  problème de \

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

problème de \

n°618791
bird80
Posté le 22-01-2004 à 12:25:20  profilanswer
 

bonjour,
 
J'ai un problème d'anti slash
quand je rentre une chaine avec un slash dans un champ texte et que je la réaffiche apres suivant le serveur j'ai :
exemple :
 chaine :
"//toto/tata" => "/toto/tata"
ou ce que je souhaite
"//toto/tata" => "//toto/tata"
 
je me demande si ca se trouve dans le php.ini ca comme info?

mood
Publicité
Posté le 22-01-2004 à 12:25:20  profilanswer
 

n°618794
Profil sup​primé
Posté le 22-01-2004 à 12:27:25  answer
 

faut les doubler si c des anti slash enfin là c des slash dans ton exemple donc faut savoir de quoi tu parle [:spamafote]

n°618798
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 12:28:29  profilanswer
 

T'as des problèmes de slash ou de backslash ? :heink:
Pour le backslash, c'est normal, c'est un caractère utilisé pour escaper les caractères spéciaux. Donc stu veux avoir "youpi\youpla" dans une chaîne, il te faudra doubler ton backslash et faire $variable = "youpi\\youpla";


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618804
bird80
Posté le 22-01-2004 à 12:35:56  profilanswer
 

oui mon exemple ne va pas :
"\\toto\tata" => "\toto\tata"  
ou ce que je souhaite  
"\\toto\tata" => "\\toto\tata"  
 
donc la question est que ca diffère entre le serveur apache/php de deux becanes.
Ca marche chez moi mais pas chez un pote
lorque je rentre :
"\\toto\tata" => "\\toto\tata"  c'est ce que je veux et je ne traite pas la chaine.
chez un pote ca fait ca :
"\\toto\tata" => "\toto\tata" il y a un slash de parti  !!
c'est étrange non

n°618807
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 12:37:39  profilanswer
 

Non, faut les doubler comme on t'a dit juste avant !
Pour avoir "\\toto\tata", il te faudra écrire "\\\\toto\\tata"


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618809
bird80
Posté le 22-01-2004 à 12:41:22  profilanswer
 

chez moi sans les doubler c'est bon
chez lui seulement le premier slash de la chaine n'apparait pas

n°618810
Profil sup​primé
Posté le 22-01-2004 à 12:42:01  answer
 

bourdel mais si on te dis de les doubler :fou:

n°618811
bird80
Posté le 22-01-2004 à 12:42:45  profilanswer
 

ok je teste mais ca va merder je le sens

n°618812
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 12:44:42  profilanswer
 

:cry:


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618814
bird80
Posté le 22-01-2004 à 12:46:02  profilanswer
 

effectivement chez moi ca marche toujours :
infos rentrées \\\\toto\\tata
infos affichées \\\\toto\\tata
infos voulues \\toto\tata

mood
Publicité
Posté le 22-01-2004 à 12:46:02  profilanswer
 

n°618815
bird80
Posté le 22-01-2004 à 12:47:22  profilanswer
 

et chez mon pote
infos rentrées \\\\toto\\tata  
infos affichées \\\toto\\tata  
infos voulues \\toto\tata

n°618816
bird80
Posté le 22-01-2004 à 12:47:34  profilanswer
 

il ya vraiment quelque chose de zarb

n°618819
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 12:50:18  profilanswer
 

:heink: tu les "rentres" comment tes infos ?
Tente le bout de code tout con :
echo "\\\\toto\\tata" et vois c'que ça donne.


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618822
bird80
Posté le 22-01-2004 à 12:52:03  profilanswer
 

echo "\\\\toto\\tata" ;
resultat
\\toto\tata

n°618828
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 12:59:02  profilanswer
 

Bin c'est bon, alors !@# 'tain mais au s'cours :D


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618830
bird80
Posté le 22-01-2004 à 13:00:44  profilanswer
 

oui et chez mon pote ca fait ca:
\ oto\tata
le premier qui me dit change de pote je le tue :)

n°618831
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 13:01:58  profilanswer
 

Change de pote :o
Je vois pas pourquoi ça fait ça chez ton pote ; doit y avoir une merde dans sa config. P'têt une histoire de magic_quotes à off, mais j'en doute.


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°618832
bird80
Posté le 22-01-2004 à 13:03:15  profilanswer
 

tout le problème est là,
chez moi j'avais pas besoin d'une confirmation, je sais que ca marche
le problème chez lui le premier \ est aspiré

n°618835
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2004 à 13:05:06  profilanswer
 

Bin alors là... j'vois pas :D


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  problème de \

 

Sujets relatifs
VB+ WMI problème listProbleme d'ecriture d'un regex.
Problème d'affichage d'une variable[publipostage word OLE] : problème étrange
PHP&Mysql : problème de retour à la ligne (bibliothèque JS Overblib)probleme en VHDL
problème avec des threads sous vb.net[DirectShow] problème lorsque je détruit mon graphe
Problème avec un delete[][batch]petit problème
Plus de sujets relatifs à : problème de \


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR