All arguments cannot be use on script
if i use $HTTP_GET_VARS or HTTP_POST_VARS it work
but i dont know if it work with file argument
I am on IIS 5 on WINDOWS 2000 PRO
Can somebody help me
Thanks
problem with arguments
Moderator: General Moderators
if by "arguments" the parameter passed client->server are meant
have a read of Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
I might be helpful
have a read of Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
I might be helpful
Thank for this
i've not turn on the global_variable on php.ini
Now my pb is file global variable
upload_single.php
in url i've this
upload_single.php?Fichier=F%3A%5Cmotos%5Cmini_7.jpg&submit=submit
and the result is
Erreurs: : Aucun fichier choisi
Thanks for all
i've not turn on the global_variable on php.ini
Now my pb is file global variable
Code: Select all
<form action="upload_single.php" method="post"
enctype="multipart/form-data">
Indiquez le nom du fichier à télécharger :
<input type="file" name="Fichier">Code: Select all
<?php
$Errors="";
if(!empty($Fichier_name))
{$CurBasePath=dirname($PATH_TRANSLATED);
$NewName=$CurBasePath."/uppics/".$Fichier_name;
copy($Fichier,$NewName);}
else
{$Errors="Aucun fichier choisi";}
?>
<html>
<head>
<title>Affichage d'une image envoyer en téléchargement
</title>
</head>
<body>
<?php
if($Errors !="")
{print("<b>Erreurs:</b> : $Errors<BR>");}
else
{print("Voici l'image téléchargé :<BR><BR>");
print("<img src="uppics/$Fichier_name" border="0">");}
?>
</body>
</html>upload_single.php?Fichier=F%3A%5Cmotos%5Cmini_7.jpg&submit=submit
and the result is
Erreurs: : Aucun fichier choisi
Thanks for all
http://www.php.net/features.file-upload has examples of how file uploads are handled with register_globals disabled.
Basically it's about moving the global variables to arrays.
e.g. $Fichier_name becomes $_FILES['Fichier']['name'] and $Fichier becomes $_FILES['Fichier']['tmp_name']
Basically it's about moving the global variables to arrays.
e.g. $Fichier_name becomes $_FILES['Fichier']['name'] and $Fichier becomes $_FILES['Fichier']['tmp_name']