回答編集履歴

1

注記

2016/07/01 07:57

投稿

yambejp
yambejp

スコア114883

test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  header("Content-Disposition: attachment; filename=\"$file\"");
20
20
 
21
- fread($file);
21
+ readfile($file);
22
22
 
23
23
  exit;
24
24
 
@@ -40,6 +40,8 @@
40
40
 
41
41
  <a href="imgdownload.php?file=1.txt">1.txt</a>
42
42
 
43
- <a href="imgdownload.php?file=1.jpg">1.jpg</a>
43
+ <a href="imgdownload.php?file=1.jpg">1.jpg(カレントのファイル)</a>
44
+
45
+ <a href="imgdownload.php?file=images/2.jpg">images/2.jpg(相対パスOK)</a>
44
46
 
45
47
  ```