Posted by Bartosz Wegrzyn on 05/21/05 04:10
Oli Filth wrote:
> Bartosz Wegrzyn wrote:
>
>>I am trying to upload images using either exec command.
>>The file is uploaded ok.
>>My script:
>>
>><html>
>><head>
>><title>Picture Upload Page</title>
>><?php
>>
>>if ($_POST['upload']=="upload") {
>>
>> $fnamefrom = ' ()/\%"'."'^&*@!`~";
>> $fnameto = "+__________+___";
>> $fname = strtr($pic_name,$fnamefrom,$fnameto);
>>
>> if ($pic_size > 0) {
>> $upload_file = system("/bin/cp $pic
>
> ^
> Where is $pic coming
> from?
>
> And why are you using system commands when there's perfectly good PHP
> functions to do exactly what you want? e.g. move_uploaded_file(), or
> even just copy()
>
the pic is comming from the form
Navigation:
[Reply to this message]
|