Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-10-2003, 04:20 PM
Novice Webmaster
 
Join Date: Sep 2003
Location: gombak
Posts: 29
Rep Power: 0
selamba_warrior is on a distinguished road
Send a message via Yahoo to selamba_warrior
cam ner ye

ape command yg buleh digunakan untuk membolehkan file di upload and download kan.....sbb aku tak jumpe lagi le command tue.....aku gune Linux,MySQL and Apache
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-10-2003, 03:54 PM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
ini utk upload

<?php
$dl = "http://www.dreamerdesign.com.my/folder"; //url folder mana ko nak upload
$absolute_path = "c:/apache/htdocs/php/folder"; //directory mana ko nak letak sebenarnyer
$extlimit = "no";
$limitedext = array(".gif",".jpg",".png",".jpeg");
$sizelimit = "no";
$sizebytes = "200000";

$dir = "dir";
if ($file != "") {

if (file_exists("$absolute_path/$file_name")) {
die("$file_name has laready uploaded.");
}

if (($sizelimit == "yes") && ($file_size > $sizebytes)){
die("File is to big. It must be $sizebytes bytes or less.");
}

$ext = strrchr($file_name,'.');
if (($extlimit == "yes") && (!in_array($ext,$limitedext))) {
die("The file you are uploading doesn't have the correct extension.");
}

@copy($file, "$absolute_path/$file_name") or die("The file you are trying to upload couldn't be copied to the server");

}
else {
die("Must select file to upload");
}
?>

<html>
<head>
<title>dreamer designt</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<font color="#666666" size="-1" face="Arial, Helvetica, sans-serif">Click Upload
To Upload Your File</font>
<form method=POST action=<?php $php_self; ?> enctype=multipart/form-data>
<input type=file name=file size=30><br>
<input type=submit value='upload'>
</form>
</body>
</html>
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-10-2003, 03:58 PM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
ini untuk download

<html>
<head>
<title>dreamer design</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<?php
$dl = "http://www.dreamerdesign.com.my/folder"; //url folder mana ko nak upload
$absolute_path = "c:/apache/htdocs/php/folder"; //directory mana ko nak letak sebenarnyer
$extlimit = "no";
$limitedext = array(".gif",".jpg",".png",".jpeg");
$sizelimit = "no";
$sizebytes = "200000";

echo "Click To Download";

$list = "<table width=400 border=1 bordercolor=#000000 style=\"border-collapse: collapse\">";
$dir = opendir($absolute_path);
while($file = readdir($dir)) {
if (($file != "..") and ($file != ".")) {
$list .= "<tr><td width=700><a href='$dl/$file'>$file</a></center></td></tr>";
}
}
$list .= "</table>";
echo $list;
?>

</body>
</html>
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-10-2003, 04:00 PM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
ko test la
sbb aku tak pandu uji lagi
aper2 prob msg aku...

hope this can give u some picture skit...
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-10-2003, 11:58 AM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
cam ni ler...
$dl tu adalah directory url ko... camana nak terangkan yerk... hah... kalau ko guna localhost dia patut jadi

$dl = "http://localhost/nama_folder_filephp/nama_folder_barangupload";

pandai2 lre ko pk sendiri.. tp camtu ler... localhost tu kire cam nama domain ko ler... kalau ko pakai yahoo.com... dier jadiler http://www.yahoo.com/nama_folder_fil...r_barangupload

$absolute_path plak adalah directory dalam window ker linux ko... maksud nyer kat mana ko simpan folder barang upload ko tu... kalau ko pakai phptriad dier patut jadi

$absolute_path = "c:/apache/htdocs/nama_folder_filephp/nama_folder_barangupload";

paham tak... aku ni lemah skit bab2 terang menerang ni sori ler..
tp aku arap ko paham ler
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-10-2003, 12:02 PM
mauntech's Avatar
Not WM,review as regular
 
Join Date: Sep 2003
Location: PJ
Posts: 320
Rep Power: 67
mauntech is on a distinguished road
Send a message via ICQ to mauntech Send a message via Yahoo to mauntech
wah..penerangan yg bagus...aku nak try la
__________________
Road Trip Project
Give us your thoughts & Ideas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-10-2003, 12:04 PM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
cam ni pun bagus ker....
pelik pelik...
anyway tq...
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 16-10-2003, 11:12 AM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
hahahahahhaa
sori kekawan..
ader kesilapan kat coding tuh...
aku baru perasaan..
itu aku edit skit.. supaya tak sama ngan projek aku nyer..
tp terlebih edit lak..
hahahhahaha

ini yang betul nyer..
sori.. selamba_warrior...

PHP Code:
<?php

if ($action=="upload"){
$dl "http://www.dreamerdesign.com.my/folder"//url folder mana ko nak upload
$absolute_path "c:/apache/htdocs/php/folder"//directory mana ko nak letak sebenarnyer
$extlimit "no"
$limitedext = array(".gif",".jpg",".png",".jpeg"); 
$sizelimit "no"
$sizebytes "200000"

$dir "dir";
if (
$file != "") {

if (
file_exists("$absolute_path/$file_name")) {
die(
"$file_name has laready uploaded.");
}

if ((
$sizelimit == "yes") && ($file_size $sizebytes)){
die(
"File is to big. It must be $sizebytes bytes or less.");
}

$ext strrchr($file_name,'.');
if ((
$extlimit == "yes") && (!in_array($ext,$limitedext))) {
die(
"The file you are uploading doesn't have the correct extension.");
}

@
copy($file"$absolute_path/$file_name") or die("The file you are trying to upload couldn't be copied to the server");


else {
die(
"Must select file to upload");
}

}
?>

<html>
<head>
<title>dreamer designt</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<font color="#666666" size="-1" face="Arial, Helvetica, sans-serif">Click Upload 
To Upload Your File</font> 
<form method=POST action=upload.php enctype=multipart/form-data >
<input type=file name=file size=30><br>
<input type=hidden name=action value=upload>
<input type=submit value='upload'>
</form>
</body>
</html>
ko save file ni sbagai upload.php...
kalau nak tukar nama file tukar kat dalam tag <form> tuh...

ok tuh jer kot...
sori untuk sebarang kesulitan...
hahahhahaa
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 21-10-2003, 01:53 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
humang ai.... baik tul le leher putih ni... dia tanya apa command... nak amik full code teruih...

selamba worrior pie la survey dulu baru le posting kat sini kalau ade masalah... tak gitu? baru le berporum.. ni dah kira requesting nih... hue hue hue

bukan ape... tak mau le makan suap... sampey bile tak pandai. tak gitu kengkawan?
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 21-10-2003, 05:16 PM
white_neck's Avatar
Senior Webmaster
 
Join Date: Jan 2003
Location: dreamland
Posts: 240
Rep Power: 73
white_neck is on a distinguished road
Send a message via Yahoo to white_neck
skali lg aku taip...

biar la dier...
malu bertanya sesat jalan tau tak...
hihihik
__________________
^_^ <== stay happy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 21-10-2003, 11:53 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
sekali lagi gak aku ketawa... hhihiihihihi... yo lah
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +8. The time now is 09:32 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59