Topic: easy upload and download need help! (Read 2361 times)
Metal slug addict
Posts: 19
118 credits Members referred : 0
« on: Apr 20, 2007, 06:09:30 AM »
ive downloaded easy upload php, ive confgured the mulitple file upload php to my needs. im a newbie. i wanted my easy upload to look the same as it was together with the drop down menu directory. can someone help me
« Last Edit: Apr 20, 2007, 01:32:31 PM by Olaf »
aka J Love Community Supporter?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits Members referred : 4
Re: easy upload dilema
« Reply #1 on: Apr 20, 2007, 08:26:40 AM »
you aren't really stating what your problem is, we wont be able to help unless you give a better description and maybe some code snippets
ive downloaded easy upload php, ive confgured the mulitple file upload php to my needs. im a newbie. i wanted my easy upload to look the same as it was together with the drop down menu directory. can someone help me
Hi,
this drop down is not part of the upload class, its a combination several scripts, check here:
@Method, if you know the scripts its much mire clear too answer
Metal slug addict
Posts: 19
118 credits Members referred : 0
« Reply #3 on: Apr 20, 2007, 10:22:41 AM »
hehehe sorry i think thats the problem with newbies they tend to talk and talk without stating the facts. sorry. the problem, ive downloaded easy php upload at php scripts and classes. i like its appearance in the demo script (the upload function and download functions). what im trying to get at is use the download function in my own site too. the link to php.net doesnt point to such script. and additional, the scirpt i used for the easy php upload demo is the multiple file upload. how can i make my upload & download site look exactly in the php scripts and classes site. "UPLOAD FUNCTION AND DOWNLOAD FUNCTION" visible in my page. hope this is clear i pray thanks and more power
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
hehehe sorry i think thats the problem with newbies they tend to talk and talk without stating the facts. sorry. the problem, ive downloaded easy php upload at php scripts and classes. i like its appearance in the demo script (the upload function and download functions). what im trying to get at is use the download function in my own site too. the link to php.net doesnt point to such script. and additional, the scirpt i used for the easy php upload demo is the multiple file upload. how can i make my upload & download site look exactly in the php scripts and classes site. "UPLOAD FUNCTION AND DOWNLOAD FUNCTION" visible in my page. hope this is clear i pray thanks and more power
as I posted in the other thread, its a combination of 3 scripts, because of security reasons I can't show you the code from my demopage
Metal slug addict
Posts: 19
118 credits Members referred : 0
« Reply #5 on: Apr 20, 2007, 10:36:55 AM »
Maybe you can email it to me. kimusabe007@yahoo.com, i really love to use the script on my page. or you can teach me pls. thanks
Metal slug addict
Posts: 19
118 credits Members referred : 0
« Reply #6 on: Apr 20, 2007, 10:52:10 AM »
what do you mean "combination"? of a class and 3 sniplets? what ive done so far is created a .php page and <? include upload_example.php on it. It appeared well and i been able to upload files. the problem is i also wanted the download function and open directory function to appear on the .php ive created. thanks
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
It's time to use PHP5!
« Reply #7 on: Apr 20, 2007, 10:59:52 AM »
Do you have any PHP knowledge?
maybe you need to try some beginners tutorial first
Metal slug addict
Posts: 19
118 credits Members referred : 0
« Reply #8 on: Apr 20, 2007, 11:31:35 AM »
im really a newbie im really sorry for annoying you. i really wanted to explore this script for my page to look good but it seems that your holding back in helping me. ill just have to play around with it anyway. dont know any php thats why i seeking help in this forum. thanks and more power
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
im really a newbie im really sorry for annoying you. i really wanted to explore this script for my page to look good but it seems that your holding back in helping me. ill just have to play around with it anyway. dont know any php thats why i seeking help in this forum. thanks and more power
helping people doesn't mean give everything for free what someone has asked (next time you will ask me for a copy of my website ), you got my script (for free) and you didn't showed me the code where you have a problem. If you can show me the code I will try to locate the problem.
DON'T POST the code I have already provided, but it's not a shame PHP web development is a profession (same like web design), you can't lean that by downloading a script...
Metal slug addict
Posts: 19
118 credits Members referred : 0
« Reply #10 on: Apr 20, 2007, 12:34:16 PM »
no that is not the case i really appreciate the code you have provided for free. the easy upload php doesnt have a problem for me, and its been working perfectly in my site. all i want is the download and open directory function which i saw in your script demo page. honestly i dont know where to start? no errors in the scipt thank again for your patience
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
no that is not the case i really appreciate the code you have provided for free. the easy upload php doesnt have a problem for me, and its been working perfectly in my site. all i want is the download and open directory function which i saw in your script demo page. honestly i dont know where to start? no errors in the scipt thank again for your patience
start with the open directory function to get the select working
then on my directory.php file i put this <? include("home/download.php");?> thanks
the main file which adapts to my site is directory.php, within directory.php is the <? include statement which points to download.php. im i on the right track?
« Last Edit: Apr 23, 2007, 11:50:09 AM by andoy »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
error 2 is gone i have the directory and drop down box visible now.
ok then next you need somthing like
Code:
<?php if (!empty($_REQUEST['selectfoldername'])) { $path = $_SERVER['DOCUMENT_ROOT']."/path2file/"; // play with the path if the document root does noet exist $fullPath = $path.$_GET['selectfoldername'];
if ($fd = fopen ($fullPath, "r")) { $fsize = filesize($fullPath); $path_parts = pathinfo($fullPath); $ext = strtolower($path_parts["extension"]); switch ($ext) { case "pdf": header("Content-type: application/pdf"); // add here more headers for diff. extensions header("Content-Disposition: attachment; filename=\"".$path_parts["basename"]."\""); // use 'attachement' to force a download break; default; header("Content-type: application/octet-stream"); header("Content-Disposition: filename=\"".$path_parts["basename"]."\""); } header("Content-length: $fsize"); header("Cache-control: private"); //use this to open files directly while(!feof($fd)) { $buffer = fread($fd, 2048); echo $buffer; } } fclose ($fd); exit; }
this code should be before any html code and you need to change some variables