質問するログイン新規登録

質問編集履歴

1

コードの添付

2015/06/13 07:58

投稿

TaskForce
TaskForce

スコア10

title CHANGED
File without changes
body CHANGED
@@ -8,10 +8,20 @@
8
8
 
9
9
  ---
10
10
  makefile.php
11
- contents = file_get_contents( "template.php" );
12
11
 
12
+
13
+ $contents = file_get_contents( "template.php" );
14
+
15
+ $contents = str_replace( "<%PAGETITLE>", htmlspecialchars($pagetitle), $contents);
16
+ $handle = fopen( "hoge.html", 'w');
17
+ fwrite( $handle, $contents);
13
18
  ---
14
19
  template.php
20
+
15
21
  <?php include( dirname(__FILE__).'/header.php' ); ?>
16
- ...
22
+
17
- <?php include( dirname(__FILE__).'/footer.php' ); ?>
23
+ <?php include( dirname(__FILE__).'/footer.php' ); ?>
24
+ ---
25
+ header.php
26
+
27
+ <title><%PAGETITLE></title>