Changeset 8722 for temp/trunk/html/test


Ignore:
Timestamp:
2006/11/21 11:14:14 (20 years ago)
Author:
uehara
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/test/uehara/file_view.php

    r8721 r8722  
    1010// ľÀÜɽ¼¨¤·¤Ê¤¤¥Õ¥¡¥¤¥ë¤òÄêµÁ 
    1111$arrViewFile = array( 
    12  'html', 
    13  'htm', 
    14  'tpl', 
    15  'php', 
     12                    'html', 
     13                    'htm', 
     14                    'tpl', 
     15                    'php', 
    1616); 
    1717 
     
    1919$ext = $arrResult[count($arrResult)-1]; 
    2020 
    21 sfprintr($ext); 
    22  
    2321// ¥Õ¥¡¥¤¥ëÆâÍÆÉ½¼¨ 
    24 header("Content-type: text/plain\n\n"); 
    25 print(sfReadFile(USER_PATH.$_GET['file'])); 
    26  
     22if(in_array($arrViewFile($ext))) { 
     23    header("Content-type: text/plain\n\n"); 
     24    print(sfReadFile(USER_PATH.$_GET['file'])); 
     25} else { 
     26    header("Location :".USER_URL.$_GET['file']); 
     27} 
    2728?> 
Note: See TracChangeset for help on using the changeset viewer.