Wuu Posted March 4, 2009 Report Share Posted March 4, 2009 Lai piemērām man ir links "link.php" iekš php ir PNG zīmējumu ģenerātors ,un kad uz viņa uzspiežu man izmetas browseri download logs uz failu "majvabole.png" Quote Link to comment Share on other sites More sharing options...
cucumber Posted March 4, 2009 Report Share Posted March 4, 2009 header("Content type") Quote Link to comment Share on other sites More sharing options...
Wuu Posted March 4, 2009 Author Report Share Posted March 4, 2009 header("Content-type: image/png"); header('Cache-control: no-cache, no-store'); imagepng($img); Nu man ir tā kā nomainīt padodamā faila nosaukumu savādāk viņam nosaukums kā php! Un browseris viņu padod ka zīmējumu nevis kā download linku! Quote Link to comment Share on other sites More sharing options...
cucumber Posted March 4, 2009 Report Share Posted March 4, 2009 (edited) How about that? header("Content-type: image/png"); header('Content-Disposition: attachment; filename="fails.jpg"'); readfile('istaiscelshuzfailu.jpg'); Edited March 4, 2009 by cucumber Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.