回答編集履歴

4

typo

2015/07/08 06:56

投稿

nanndemoiikara
nanndemoiikara

スコア775

test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  <?php if ( count($row) < 3 ) continue;?>
56
56
 
57
- <dt><?php echo e($row[0])?>(<?php echo e($row[0])?>)</dt>
57
+ <dt><?php echo e($row[1])?>(<?php echo e($row[0])?>)</dt>
58
58
 
59
59
  <dd style="border-bottom:1px solid #DDD;"><?php echo e($row[2]);?></dd>
60
60
 

3

typo

2015/07/08 06:56

投稿

nanndemoiikara
nanndemoiikara

スコア775

test CHANGED
@@ -52,7 +52,7 @@
52
52
 
53
53
  <?php $row = explode("\t", $row_str);?>
54
54
 
55
- <?php if ( count($row) <= 3 ) continue;?>
55
+ <?php if ( count($row) < 3 ) continue;?>
56
56
 
57
57
  <dt><?php echo e($row[0])?>(<?php echo e($row[0])?>)</dt>
58
58
 

2

追記

2015/07/08 06:55

投稿

nanndemoiikara
nanndemoiikara

スコア775

test CHANGED
@@ -31,3 +31,35 @@
31
31
  header('Location: http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/').'/guest_input.php');
32
32
 
33
33
  ```
34
+
35
+
36
+
37
+
38
+
39
+ ```lang-php
40
+
41
+ <?php
42
+
43
+ if ( ! is_file('bbs.dat') ) exit('bbsファイルが開けませんでした。');
44
+
45
+ $file = file('bbs.dat');
46
+
47
+ ?>
48
+
49
+ <dl>
50
+
51
+ <?php foreach($file as $row_str):?>
52
+
53
+ <?php $row = explode("\t", $row_str);?>
54
+
55
+ <?php if ( count($row) <= 3 ) continue;?>
56
+
57
+ <dt><?php echo e($row[0])?>(<?php echo e($row[0])?>)</dt>
58
+
59
+ <dd style="border-bottom:1px solid #DDD;"><?php echo e($row[2]);?></dd>
60
+
61
+ <?php endforeach;?>
62
+
63
+ </dl>
64
+
65
+ ```

1

コメントアウトを読みやすく修正

2015/07/08 06:54

投稿

nanndemoiikara
nanndemoiikara

スコア775

test CHANGED
@@ -22,9 +22,11 @@
22
22
 
23
23
  *直下の時に/が反映されるのでrtirmで回避
24
24
 
25
- *header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SEVER['PHP_SELF']).'/guest_input.php');
25
+ **/
26
26
 
27
- **/
27
+ //header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SEVER['PHP_SELF']).'/guest_input.php');
28
+
29
+
28
30
 
29
31
  header('Location: http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/').'/guest_input.php');
30
32