当前位置: 首页>>代码示例>>PHP>>正文


PHP dir::base方法代码示例

本文整理汇总了PHP中dir::base方法的典型用法代码示例。如果您正苦于以下问题:PHP dir::base方法的具体用法?PHP dir::base怎么用?PHP dir::base使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dir的用法示例。


在下文中一共展示了dir::base方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 public static function save()
 {
     if (!self::$isChange) {
         return true;
     }
     $newEntrys = array_merge(self::$params, self::$newEntrys);
     return file_put_contents(dir::base('lib' . DIRECTORY_SEPARATOR . 'config.json'), json_encode($newEntrys, JSON_PRETTY_PRINT));
 }
开发者ID:kyroskoh,项目名称:rokket,代码行数:8,代码来源:rp.php

示例2: stripPath

function stripPath($file)
{
    return str_replace(dir::base(), '', $file);
}
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:4,代码来源:general.php

示例3: copy

<?php

$sql = sql::factory();
$sql->query('ALTER TABLE ' . sql::table('structure') . ' 
ADD `seo_title` 		VARCHAR(255) NOT NULL,
ADD `seo_keywords` 		VARCHAR(255) NOT NULL,
ADD `seo_description`	VARCHAR(255) NOT NULL,
ADD `seo_costum_url` 	VARCHAR(255) NOT NULL,
ADD `seo_robots` 		int(1)		 NOT NULL DEFAULT "1"
');
copy(dir::addon('seo', '_htaccess'), dir::base('.htaccess'));
include_once dir::addon('seo', 'lib' . DIRECTORY_SEPARATOR . 'seo_rewrite.php');
seo_rewrite::generatePathlist();
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:13,代码来源:install.php

示例4: opendir

                    <label class="col-sm-4"><?php 
echo lang::get('language');
?>
</label>
                    <div class="col-sm-8">
                        
                        <select name="lang">
                        <option value="<?php 
echo rp::get('lang');
?>
"><?php 
echo lang::get('lang_select');
?>
</option>
                        <?php 
$handle = opendir(dir::base('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR));
while ($file = readdir($handle)) {
    if (in_array($file, ['.', '..'])) {
        continue;
    }
    echo '<option value="' . $file . '">' . $file . '</option>';
}
?>
                        </select>
                    </div>
                    
                </div>
            
                <div class="input row">
                    <label class="col-sm-4"><?php 
echo lang::get('logs');
开发者ID:DINKIN,项目名称:rokket,代码行数:31,代码来源:settings.php

示例5: table

    $file = dir::addon($addon, 'README.md');
    if (file_exists($file)) {
        echo markdown::parse(file_get_contents($file));
    } else {
        echo lang::get('addon_no_readme');
    }
    ?>
		</div>
    </div>
<?php 
} else {
    $table = new table();
    $table->addCollsLayout('25,*,215, 70');
    $table->addRow()->addCell('')->addCell(lang::get('name'))->addCell(lang::get('status'))->addCell('');
    $table->addSection('tbody');
    $addons = array_diff(scandir(dir::base('addons' . DIRECTORY_SEPARATOR)), ['.', '..', '.htaccess']);
    if (count($addons)) {
        foreach ($addons as $dir) {
            $curAddon = new addon($dir);
            $status = '';
            $delete = '<a href="?page=addons&addon=' . $dir . '&action=delete" class="delete"></a>';
            $status .= '
				<form action="" method="get">
					<input type="hidden" name="page" value="addons">
					<input type="hidden" name="addon" value="' . $dir . '">
					<select class="addonAction" name="action">';
            if ($curAddon->isActive()) {
                $status .= '<option selected="selected" value="">' . lang::get('addon_actived') . '</option>';
            } elseif ($curAddon->isInstall()) {
                $status .= '<option selected="selected" value="">' . lang::get('addon_installed') . '</option>';
            } else {
开发者ID:DINKIN,项目名称:rokket,代码行数:31,代码来源:addons.php

示例6: trim

<div class="row">
	<div class="col-md-6">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title"><?php 
echo lang::get('htacces_install');
?>
</h3>
			</div>
			<div class="panel-body">
				<?php 
$form = form::factory('user', 'id=' . dyn::get('user')->get('id'), 'index.php');
$form->setSave(false);
$form->delButton('back');
$form->delButton('save');
$htaccessRoot = dir::base('.htaccess');
$htaccessOrg = dir::addon('seo', '_htaccess');
$field = $form->addRadioField('redirect', 'www');
$field->fieldName(lang::get('seo_redirect_to'));
$field->add('www', 'www.');
$field->add('no_www', lang::get('seo_no_www'));
$urlPath = parse_url(dyn::get('hp_url'));
$subdir = '/';
if (isset($urlPath['path'])) {
    $subdir = trim($urlPath['path'], '/');
}
if ($subdir == '') {
    $subdir = '/';
}
$field = $form->addTextField('rewrite_base', $subdir);
$field->addAttribute('readonly', 'readonly');
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:31,代码来源:seo.setup.php

示例7: __construct

 public function __construct($dir = '')
 {
     self::$base = realpath($dir);
 }
开发者ID:DINKIN,项目名称:rokket,代码行数:4,代码来源:dir.php

示例8: mkdir

<?php

if (!file_exists(dir::base('media'))) {
    mkdir(dir::base('media'), 755);
}
$sql = sql::factory();
$sql->query('CREATE TABLE IF NOT EXISTS ' . sql::table('media') . ' (
`id` 			int(16)		unsigned 	NOT NULL 	auto_increment,
`filename`		varchar(255)			NOT NULL,
`category`		int(16)		unsigned 	NOT NULL,
`size` 			int(16)		unsigned 	NOT NULL,
`title` 		varchar(255)			NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;');
$sql->query('CREATE TABLE IF NOT EXISTS ' . sql::table('media_cat') . ' (
`id` 			int(16)		unsigned 	NOT NULL 	auto_increment,
`name`			varchar(255)			NOT NULL,
`sort` 			int(16)		unsigned 	NOT NULL,
`pid` 			int(16)		unsigned	NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;');
$sql->query('ALTER TABLE ' . sql::table('structure_area') . ' 
ADD `media1` 		int(16) NOT NULL,
ADD `media2` 		int(16) NOT NULL,
ADD `media3` 		int(16) NOT NULL,
ADD `media4` 		int(16) NOT NULL,
ADD `media5` 		int(16) NOT NULL,
ADD `media6` 		int(16) NOT NULL,
ADD `media7` 		int(16) NOT NULL,
ADD `media8` 		int(16) NOT NULL,
ADD `media9` 		int(16) NOT NULL,
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:31,代码来源:install.php

示例9: getModulCode

 public static function getModulCode($file)
 {
     return dir::base('install' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file);
 }
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:4,代码来源:install.php


注:本文中的dir::base方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。