Jump to content
php.lv forumi

Kā padot failu caur php


Wuu

Recommended Posts

header("Content type")

Link to comment
Share on other sites

	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!

Link to comment
Share on other sites

How about that?

header("Content-type: image/png");
header('Content-Disposition: attachment; filename="fails.jpg"');
readfile('istaiscelshuzfailu.jpg');

Edited by cucumber
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...