I'm new to the game of web designing. I have learned all the basics of using a database back end (MYSQL) with PHP to build a website. One of the things I still don't know how to do is put like a zip folder, or even individual files, on my website and like to them for people to download. The reason I want to do this is because I'm trying to build an website that's basically a portfolio of all of the programs I've done so that I can just give them the website and they can see every thing I've done for themselves.
You can just upload your zip-files, and make links to them; for example:
<a href="http://mydomain.com/zips/project1.zip">Download Project 1 (zip-file, ...kB)</a>
<a href="http://mydomain.com/zips/project2.zip">Download Project 2 (zip-file, ...kB)</a>
Clicking the links, the visitor will be asked where to save the zip-file (in a common Explorer window).
Got it in one.
Thank you very much.
You can also place them outside of the public domain and use server side processing to collect users email addresses prior to download.
One thing I'd add is that downloading zip files is not as popular as it once was, due to hidden malware or similar, and some downloads might get blocked.
If you need to use the zip file to control a directory structure on download, or it's essential for compression, then fine.
But if it's a single file and the compression is not large then just offer the original file. I've seen people offer single pdf files in zips with little compression benefit and it just unnecessarily complicates things for the end user.
Hope this helps,
Thanks for the fix. That works fine for me too.
A ZIP file contains more than one files that are compressed for easy transfer through network and for efficient storage. However, many times it has been marked that you receive error messages while accessing the ZIP file, leading to data loss.
Here, you can read about the benefits of the download attribute in HTML5. http://davidwalsh.name/download-attribute
This topic is now closed. New replies are no longer allowed.