Forum » Izdelava spletišč » Download
Download
![](https://static.slo-tech.com/stili/avatar_gray.gif)
XzupanX ::
Na spletni strani bi rad naredil, tako da bi si lahko obiskovalci zdownloadali neko datoteko.. kako to naredim ?
- premaknil iz Programiranje: bluefish ()
![](https://static.slo-tech.com/stili/bel_non_grata.png)
VoidRay ::
<form><input type="button" value="Download Now" onClick="window.location.href='lokacija na serverju?'"></form>
![](https://static.slo-tech.com/stili/avatar_gray.gif)
techfreak :) ::
$attachment_location = $_SERVER["DOCUMENT_ROOT"] . "/file.zip"; if (file_exists($attachment_location)) { header($_SERVER["SERVER_PROTOCOL"] . " 200 OK"); header("Cache-Control: public"); // needed for i.e. header("Content-Type: application/zip"); header("Content-Transfer-Encoding: Binary"); header("Content-Length:".filesize($attachment_location)); header("Content-Disposition: attachment; filename=file.zip"); readfile($attachment_location); die(); } else { die("Error: File not found."); }
Zamenjaj file.zip z imenom tvoje slike.
Zgodovina sprememb…
- spremenil: techfreak :) ()
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Javascript DOM based XSS vulnerabilityOddelek: Programiranje | 2938 (2360) | MrStein |
» | Download vsebine strani s JSOddelek: Izdelava spletišč | 2591 (1889) | MrBrdo |
» | PHP + MySQL excel export pomoč?Oddelek: Izdelava spletišč | 1519 (1366) | sumoborac |
» | PHP autentikacija - problemOddelek: Izdelava spletišč | 1627 (1432) | krho |
» | backup preko omrežjaOddelek: Pomoč in nasveti | 1075 (959) | romario |