hi guys
I want a script to upload files through http and at the same time wants write the file name in to the database.
any help would be much appreciated
thanks in advance
http file upload
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
http file upload
i dont have any code at all.
just want to upload some pdf's through http to a folder and let user download by clicking the path
for example
http://www.mysite.com/meterials/course1.pdf
i want to write (meterials/course1.pdf) to the database
thanks
just want to upload some pdf's through http to a folder and let user download by clicking the path
for example
http://www.mysite.com/meterials/course1.pdf
i want to write (meterials/course1.pdf) to the database
thanks
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Are you looking for us to write the code for you because that isn't the way we tend to work. There has to be some attempt on your part to find the solution.
For file uploading the best place to start is here:
http://php.net/manual/en/features.file-upload.php
Mac
For file uploading the best place to start is here:
http://php.net/manual/en/features.file-upload.php
Mac
Code: Select all
<?php
require_once('YourCode.php');
if ( is_broken( $yourCode )) {
AskForHelp( 'www.devnetwork.net' );
} else {
AttemptToCreate( 'uploadScript' );
}
?>a follow up to that is:
Basicly, the common rule is - "If you don't try, we don't help you". It's not that we don't want to. It's just that we won't be able to help you effeciently. Anyhow, just google a tutorial on uploading and renaming files. Do some research on copy() and rename() in the php.net manual.
Good luck,
-Nay
ps: the code me and evilMind wrote are a joke, don't test it out!
Code: Select all
<?php
require_once('YourCode.php');
if (is_broken($yourCode)) {
AskForHelp('www.devnetwork.net');
} else {
$tries = /see what you concious have to say;
for($i=0; $i<$tries; $i++) {
AttemptToCreate('uploadScript');
}
}
?>Good luck,
-Nay
ps: the code me and evilMind wrote are a joke, don't test it out!