header('Content-Type: text/html; charset=utf-8'); //親パス設定 $root_pass = '/home/kusanagi/www.kirei-inei.net_html/DocumentRoot/'; $pass['tpl']= $root_pass.'libs/'; //必要ファイルを読み取り include($root_pass.'libs/config_2015.php'); //URLの'/'の個数から TOPへのリンクを作成 $slash = substr_count( $_SERVER['REQUEST_URI'],'/' ); //スラッシュの個数を取得 $link['top'] = ''; for ($sl=1;$sl<$slash;$sl++){ $link['top'] .= '../'; } $content = ''; $name = ''; $url = ''; if(isset($_GET['p'])){ $name = h($_GET['p']); //}else{ // $name = 'faq_main'; } $url_head = ''; if($_SERVER['HTTPS']=='on'){ $url_head = 'https://'; }else{ $url_head = 'http://'; } $url= $url_head.'www.kirei-inei.net/tpl/syusetsu_'.$name.'.html'; $content = file_get_contents($url); if(!$content){ $url= $url_head.'www.kirei-inei.net/tpl/inei_list.html'; $content = file_get_contents($url); } ?>