Changeset 3730 for temp/trunk


Ignore:
Timestamp:
2006/09/06 19:15:45 (20 years ago)
Author:
kakinaka
Message:

blank

Location:
temp/trunk/html
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/__default.php

    r3717 r3730  
    11<?php 
    2 $PHP_DIR = realpath(dirname( __FILE__)); 
    3 require_once($_SERVER['DOCUMENT_ROOT'] . "require.php"); 
     2###require### 
    43 
    54class LC_Page { 
  • temp/trunk/html/admin/design/main_edit.php

    r3729 r3730  
    138138             
    139139            // PHP¥Õ¥¡¥¤¥ëºîÀ® 
    140             // ¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤±¤ì¤ÐºîÀ®¤¹¤ë 
    141140            $cre_php = ROOT_DIR . USER_DIR . $_POST['url']; 
    142  
    143             if (!is_dir(dirname($cre_php))) { 
    144                 mkdir(dirname($cre_php)); 
    145             } 
    146             copy(USER_DEF_PHP, $cre_php . ".php"); 
     141            lfCreatePHPFile($cre_php); 
    147142        } 
    148143 
     
    336331    fclose($fp); 
    337332} 
     333 
     334/************************************************************************************************************** 
     335 * ´Ø¿ô̾   ¡§lfCreatePHPFile 
     336 * ½èÍýÆâÍÆ ¡§PHP¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë 
     337 * °ú¿ô1    ¡§$pathޥޥޥPHP¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹ 
     338 * Ìá¤êÃÍ   ¡§¤Ê¤· 
     339 **************************************************************************************************************/ 
     340function lfCreatePHPFile($path){ 
     341 
     342    // phpÊݸÀè¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤±¤ì¤ÐºîÀ®¤¹¤ë 
     343    if (!is_dir(dirname($path))) { 
     344        mkdir(dirname($path)); 
     345    } 
     346     
     347    // ¥Ù¡¼¥¹¤È¤Ê¤ëPHP¥Õ¥¡¥¤¥ë¤ÎÆÉ¤ß¹þ¤ß 
     348    if (file_exists($path)){ 
     349        $php_data = file_get_contents($path);        
     350    } 
     351     
     352    // require.php¤Î¾ì½ê¤ò½ñ¤­´¹¤¨¤ë 
     353    sfprintr($php_data); 
     354     
     355    copy(USER_DEF_PHP, $path . ".php");  
     356} 
Note: See TracChangeset for help on using the changeset viewer.