php
1 2function page($page) { 3 return str_replace('あ', 'ああ', $page); 4} 5function content($content) { 6 return str_replace('い', 'いい', $content); 7} 8function header($header) { 9 return str_replace('う', 'うう', $header); 10} 11function footer($footer) { 12 return str_replace('え', 'ええ', $footer); 13} 14 15// コンテンツの最初 16ob_start('page'); 17 18ob_start('header'); 19ヘッダーの内容 20ヘッダーの内容 21ヘッダーの内容 22ob_end_flush(); // headerの終わり 23 24ob_start('content'); 25コンテンツの内容 26コンテンツの内容 27コンテンツの内容 28ob_end_flush(); // contentの終わり 29 30ob_start('footer'); 31フッターの内容 32フッターの内容 33フッターの内容 34ob_end_flush(); // footerの終わり 35 36ob_end_flush(); // pageの終わり 37
みたいなことをしたいのですが、
いまいち**ob_end_flush();**などの終わり方が色々読んだり、試してみたのですがよく分かっていません。
こういった場合はどのように終わればいいのでしょうか?
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー