Thread: Upload file
View Single Post
  #1 (permalink)  
Old 03-01-2005, 08:24 AM
safprin's Avatar
safprin safprin is offline
Novice Webmaster
 
Join Date: Feb 2004
Location: depan pc
Posts: 99
Rep Power: 0
safprin is an unknown quantity at this point
Upload file

halo...

meh sini pakarē php...
sy ade download upload script dan berjaya la upload file kat server... tp la yg buat sy musykil la kan... dier leh set limit saiz... so sy set ler...

then... mmg jalan rr script tu...
tp yg nak sy citekan kat sini sy set la limit saiz tu melebihi 2mb
cth la 5mb...

sy upload mp3 2mb kebawah semua lepas... tp bila dah lebih 2mb je dia error x leh upload... padahal saiz limit dia 5mb...

kenapa yer? mmg server set ke?

scriptnyer seperti berikut...

PHP Code:
# header & title of this file
$title "File Upload Manager";

# individual file size limit - in bytes (102400 bytes = 100KB)
$file_size_ind "102400";

# the upload store directory (chmod 777)
$dir_store"store";

# the images directory
$dir_img"img";

# the style-sheet file to use (located in the "img" directory, excluding .css)
$style "style-def";

# the file type extensions allowed to be uploaded
$file_ext_allow = array("gif","jpg","jpeg","png","txt","nfo","doc","rtf","htm","dmg","zip","rar","gz","exe");

# option to display the file list
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$file_list_allow 1;

# option to allow file deletion
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$file_del_allow 1;

# option to password-protect this script [-part1]
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$auth_ReqPass 0;

# option to password-protect this script [-part2]
# if "$auth_ReqPass" is enabled you must set the username and password
$auth_usern "username";
$auth_passw "password";

################ end of configurations ###############


# DO NOT ALTER OR EDIT BELOW THIS LINE UNLESS YOU ARE AN ADVANCED PHP PROGRAMMER

?> 
besambung
Reply With Quote