This topic is locked

file uploads error

12/4/2005 01:05:32
PHPRunner General questions
kanso author

Hi,

I didn't have any problem with uploading , text and image but I keep getting error when I try to upload html file.
move_uploaded_file(/myfolder/my.html): failed to open stream: No such file or directory

URL www.my.net/folder/my_add.php

Error file /home/my/public_html/myfolder/mydatabase_add.php

Error line 140

SQL query insert into `my database` (`field3`, `field4`) values ('my file', 'http://my.net/folder/my.html';)
What I did:

created table with 4 field

file id

filename

url(varchar)

html field(blob,binary).
Question:
Database file - choose this type if you use this field to hold binary files. Click on Change ... to choose a field to store filename field.
This is where I get confused.

Is this field- blob field-is. where I'll upload the html file?

or stored file_url?

what am I missing here?

Sergey Kornilov admin 12/5/2005

Hi,
you can upload files from your local disk only.

So if you need to upload some file from Web to your server, you need to download it first and save on your computer, then upload it to your server.

Uploading will fail if you'd put the URL instead to edit box of local file path.
When you choose Document upload edit type the files will be saved in a directory on your server. And their names will be stored in database. You need a VARCHAR field for this edit type.
When you choose Databasefile type, the files will be stored in database. You need a field BLOB type

to use this edit type. Also you'll need an additonal VARCHAR field to store file names.

kanso author 12/5/2005

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=6968&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> got it .

Thanks Sergy,

Always, kano