[PHP] afficher apres le slash ?
Résolu
baltazar852000
Messages postés
21
Date d'inscription
Statut
Membre
Dernière intervention
-
baltazar852000 Messages postés 21 Date d'inscription Statut Membre Dernière intervention -
baltazar852000 Messages postés 21 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
voici mon code :
<html>
<head>
</head>
<body>
<?php
if(isset($_POST['envoi']))
{
echo "l'image est ".$_POST['image'];
//rewind($_POST['image');
}
?>
<form method="post" name="image_envoi">
<input type="file" name="image" size=50>
<br><br>
<input name="envoi" type="submit" value="Envoyer les fichiers">
</form>
</body>
</html>
il m'affiche :
l'image est C:\Documents and Settings\Administrateur\Bureau\image1.jpg
je veux qu'il m'afffiche seulement:
l'image est image1.jpg
et merci.
voici mon code :
<html>
<head>
</head>
<body>
<?php
if(isset($_POST['envoi']))
{
echo "l'image est ".$_POST['image'];
//rewind($_POST['image');
}
?>
<form method="post" name="image_envoi">
<input type="file" name="image" size=50>
<br><br>
<input name="envoi" type="submit" value="Envoyer les fichiers">
</form>
</body>
</html>
il m'affiche :
l'image est C:\Documents and Settings\Administrateur\Bureau\image1.jpg
je veux qu'il m'afffiche seulement:
l'image est image1.jpg
et merci.
A voir également:
- [PHP] afficher apres le slash ?
- 3d slash - Télécharger - 3D
- Slash droit ✓ - Forum Autres distributions Linux
- Le signe " | " dans excel - Forum Excel
- Barre verticale droite sur clavier mac - Forum MacOS
- Anti slash ✓ - Forum Réseau
2 réponses
ah oui
merci beaucoup Nxt
merci beaucoup Nxt
enfin, j'ai trouvé:
<html>
<head>
</head>
<body>
<?php
if(isset($_POST['envoi']))
{
echo substr(strrchr($_POST['image'], "\\"), 1);
}
?>
<form method="post" name="image_envoi">
<input type="file" name="image" size=50><br><br>
<input name="envoi" type="submit" value="Envoyer les fichiers">
</form>
</body>
</html>
<html>
<head>
</head>
<body>
<?php
if(isset($_POST['envoi']))
{
echo substr(strrchr($_POST['image'], "\\"), 1);
}
?>
<form method="post" name="image_envoi">
<input type="file" name="image" size=50><br><br>
<input name="envoi" type="submit" value="Envoyer les fichiers">
</form>
</body>
</html>