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


PHP Core::url方法代码示例

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


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

示例1: action_out

 /**
  * 退出
  */
 public function action_out()
 {
     # 销毁session
     $this->session()->start()->destroy();
     #页面跳转到登录页
     $this->redirect(\Core::url('/'));
 }
开发者ID:google2013,项目名称:myqee,代码行数:10,代码来源:login.controller.php

示例2: form

 /** Builds the form field structure with an optionally supploed schema */
 public function form($schema = null)
 {
     $form = array();
     $form['name'] = $this->name;
     $form['id'] = $this->name;
     $form['class'] = $this->name;
     $form['method'] = 'post';
     $form['action'] = Core::url($_SERVER['REQUEST_URI']);
     $form['enctype'] = 'multipart/form-data';
     $form['fields'] = array();
     /** Use the provided schema or get a copy of the default */
     $s = isset($schema) ? $schema : $this->schema();
     $form['fields'][] = array('<fieldset>' => 'New Comment');
     $form['fields'][] = array('title' => $s['title']);
     $form['fields'][] = array('body' => $s['body']);
     $form['fields'][] = array('</fieldset>' => '');
     $form['fields'][] = array('<fieldset>' => 'System Information');
     $form['fields'][] = array('cid' => $s['cid']);
     $form['fields'][] = array('created' => $s['created']);
     $form['fields'][] = array('updated' => $s['updated']);
     $form['fields'][] = array('cuid' => $s['cuid']);
     $form['fields'][] = array('uuid' => $s['uuid']);
     $form['fields'][] = array('</fieldset>' => '');
     return $form;
 }
开发者ID:hoelzro,项目名称:Bifrost,代码行数:26,代码来源:comment.mdl.php

示例3: nodebug

 protected function nodebug()
 {
     $url = Core::url('/opendebugger/logout');
     $str = '';
     if (isset($_GET['forward']) && $_GET['forward']) {
         $forward = HttpIO::GET('forward', HttpIO::PARAM_TYPE_URL);
         $str = '<a href="' . $forward . '">' . $forward . '</a>';
     }
     $view = new View('opendebugger');
     $view->str = $str;
     $view->url = $url;
     $view->open = false;
     $view->render();
 }
开发者ID:liuyu121,项目名称:myqee,代码行数:14,代码来源:opendebugger.controller.php

示例4: nodebug

    protected function nodebug()
    {
        $url = \Core::url()->site('/opendebugger/logout');
        echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我不想调试</title>
</head>
<body>
<form method="post" action="{$url}" name="form1">
<input type="submit" name="submit" value="我不想调试" />
</form>
</body>
</html>
EOF;
    }
开发者ID:google2013,项目名称:myqee,代码行数:18,代码来源:opendebugger.controller.php

示例5: action_appcache

 public function action_appcache()
 {
     \header('Content-Type: text/cache-manifest');
     //\readfile(\Core::find_file('data', 'tetris','.manifest'));
     $list = array();
     foreach (\Core::$include_puth as $path) {
         $dir = $path . 'statics' . \DS;
         if (\is_dir($dir)) {
             $this->get_file_list(\strlen($dir), $dir, $list);
         }
     }
     $path = \Core::url('statics/');
     $list = \array_map(function ($t) use($path) {
         return $path . $t;
     }, $list);
     echo 'CACHE MANIFEST' . \CRLF;
     echo \implode(\CRLF, $list);
 }
开发者ID:google2013,项目名称:myqee,代码行数:18,代码来源:statics.controller.php

示例6: form

 /** Builds the form field structure with an  */
 public function form($schema = null)
 {
     $form = array();
     $form['name'] = $this->name;
     $form['id'] = $this->name;
     $form['class'] = $this->name;
     $form['method'] = 'post';
     $form['action'] = Core::url($_SERVER['REQUEST_URI']);
     $form['enctype'] = 'multipart/form-data';
     $form['fields'] = array();
     /** Use the provided schema or get a copy of the default */
     $s = isset($schema) ? $schema : $this->schema;
     /** Edit flag to block the addition of fields to to form conditionally */
     $edit = Core::get_args(1) == 'edit' ? true : false;
     $form['fields'][] = array('<fieldset>' => 'Account Information');
     $form['fields'][] = array('username' => $s['username']);
     $form['fields'][] = array('password' => $s['password']);
     $form['fields'][] = array('email' => $s['email']);
     $form['fields'][] = array('</fieldset>' => '');
     $form['fields'][] = array('<fieldset>' => 'User Information');
     $form['fields'][] = array('prefix' => $s['prefix']);
     $form['fields'][] = array('first_name' => $s['first_name']);
     $form['fields'][] = array('middle_name' => $s['middle_name']);
     $form['fields'][] = array('last_name' => $s['last_name']);
     $form['fields'][] = array('suffix' => $s['suffix']);
     $form['fields'][] = array('birthday' => $s['birthday']);
     $form['fields'][] = array('timezone' => $s['timezone']);
     $form['fields'][] = array('</fieldset>' => '');
     $form['fields'][] = array('<fieldset>' => 'Address Information');
     $form['fields'][] = array('address' => $s['address']);
     $form['fields'][] = array('country' => $s['country']);
     $form['fields'][] = array('zip' => $s['zip']);
     $form['fields'][] = array('</fieldset>' => '');
     $form['fields'][] = array('<fieldset>' => 'System Information');
     $form['fields'][] = array('uid' => $s['uid']);
     $form['fields'][] = array('created' => $s['created']);
     $form['fields'][] = array('updated' => $s['updated']);
     $form['fields'][] = array('cuid' => $s['cuid']);
     $form['fields'][] = array('uuid' => $s['uuid']);
     $form['fields'][] = array('</fieldset>' => '');
     return $form;
 }
开发者ID:hoelzro,项目名称:Bifrost,代码行数:43,代码来源:user.mdl.php

示例7:

        echo '<font color="#5fd300"><strong>√</strong></font>不存在';
        if ($type == 0) {
            if (is_writable($dir)) {
                echo '&nbsp; <font color="#5fd300"><strong>√</strong></font>可写 ';
            } else {
                echo '&nbsp; <font color="red"><strong>×</strong></font>不可写';
            }
        }
    }
    echo '</td>';
    echo '</tr>';
}
?>
<tr>
<td colspan="3" class="td1">
注:安全起见,推荐DATA目录可写入,其它文件夹推荐不可写。若系统不具备相应文件操作权限,在安装过程中系统会提示你手工操作办法。
</td>
</tr>
</tbody>
</table>
<div style="padding:20px 0 10px 0;text-align:center;">
<input type="button" value="上一步" onclick="document.location='<?php 
echo Core::url('install/');
?>
';" />
<input type="button" class="submit" value="下一步" onclick="document.location='<?php 
echo Core::url('install/step_2/');
?>
';" />
</div>
开发者ID:xiaodin1,项目名称:myqee,代码行数:30,代码来源:step_1.view.php

示例8: action_out

 public function action_out()
 {
     $this->session()->start()->destroy();
     $this->redirect(Core::url('login/'));
 }
开发者ID:google2013,项目名称:myqeecms,代码行数:5,代码来源:login.controller.php

示例9: exec

 /**
  * 指定Server执行系统内部调用
  *
  *     //指定多个服务器执行
  *     HttpServer::exec('test/abc',array('192.168.1.11:8080','192.168.1.12:80'),array('a','b','c'));
  *
  *     //指定一个服务器执行
  *     HttpServer::exec('test/abc','192.168.1.11:8080'array('a','b','c'));
  *
  * @param string $uri
  * @param array $hosts
  * @param array $param_arr
  * @return array
  */
 public static function exec($uri, $hosts, array $param_arr = array())
 {
     $one = false;
     if (is_string($hosts)) {
         $hosts = array($hosts);
         $one = true;
     }
     # 是否支持CURL
     static $curl_supper = null;
     if (null === $curl_supper) {
         $curl_supper = function_exists('curl_init');
     }
     if (IS_CLI) {
         $project_config = Core::config('core.projects' . Core::$project);
         $script = $project_config['url'];
         if (is_array($script)) {
             $script = current($script);
         }
         if (isset($project_config['url_admin'])) {
             $script .= ltrim($project_config['url_admin'], '/');
         }
         if (false === strpos($uri, '://')) {
             $url_site = Core::config('core.url.site');
             if (!$url_site) {
                 throw new Exception(__('your core config $config[\'url\'][\'site\'] is not defined.check config:ext', array(':ext' => EXT)));
             }
             $script = $url_site . ltrim($script, '/');
         }
     } else {
         $script = $_SERVER["SCRIPT_URI"];
     }
     $uri = Core::url($uri);
     if (false === strpos($uri, '://')) {
         preg_match('#^(http(?:s)?\\://[^/]+/)#', $script, $m);
         $uri = $m[1] . ltrim($uri, '/');
     }
     # http://host/uri
     $uri_arr = explode('/', $uri);
     $scr_arr = explode('/', $script);
     $uri_arr[0] = $scr_arr[0];
     $uri_arr[2] = $scr_arr[2];
     $uri = implode('/', $uri_arr);
     $time = microtime(1);
     if ($curl_supper) {
         # 调用CURL请求
         $result = HttpCall::exec_by_curl($hosts, $uri, array('data' => serialize($param_arr)));
     } else {
         # 调用socket进行连接
         $result = HttpCall::exec_by_socket($hosts, $uri, array('data' => serialize($param_arr)));
     }
     # 单条记录
     if ($one) {
         $result = current($result);
     }
     if (IS_DEBUG) {
         Core::debug()->log('system exec time:' . (microtime(1) - $time));
         Core::debug()->info($result, 'system exec result');
     }
     return $result;
 }
开发者ID:myqee,项目名称:core,代码行数:74,代码来源:httpcall.class.php

示例10: action_step_4

 public function action_step_4()
 {
     # 关闭ob_start
     Core::close_buffers(true);
     $this->step = 4;
     View::set_global('config', self::$config);
     View::set_global('step', $this->step);
     $view = new View('admin/install/header');
     $view->page_title = $this->page_title;
     $view->location = $this->location;
     $view->admin_menu = Core::config('admin/menu/install');
     $view->render(true);
     $view = new View('admin/install/step_4');
     $view->render();
     $view = new View('admin/install/bottom');
     $view->render(true);
     # 将页面内容输出
     flush();
     $sqlfile = Core::find_file('data', 'install', 'sql');
     if ($sqlfile) {
         $sql = file_get_contents($sqlfile);
         $sql = str_replace("\r\n", "\n", $sql);
         $database = Core::config('admin/core.database');
         if (!$database) {
             $database = 'default';
         }
         $db = Database::instance($database);
         $this->run_query($db, $sql);
     }
     if ($this->lock_install()) {
         $this->show_js_message('安装成功。');
     } else {
         $this->show_js_message('安装完毕。');
         $this->show_js_message('<br><font color="red">请注意:</font>系统无法创建安装锁文件,请在data目录“<font color="blue">' . Core::$project . '/</font>”下创建<font color="red">install.lock</font>文件,以防止再次安装,请手动创建此文件。');
     }
     $this->show_js_message('<br>安全起见,请删除本安装文件:' . __FILE__);
     $this->show_js_message('<br /><input type="button" value="进入后台" class="submit" onclick="document.location=\'' . Core::url('/') . '\'" /> 用户名:admin,密码:123456');
     # 强制结束
     exit;
 }
开发者ID:google2013,项目名称:myqeecms,代码行数:40,代码来源:install.controller.php

示例11: url_assets

 /**
  * 返回静态资源URL路径
  *
  * @param string $uri
  */
 public static function url_assets($uri = '')
 {
     $url = ltrim($uri, './ ');
     if (IS_DEBUG & 1) {
         # 本地调试环境
         $url_asstes = Core::url('/assets/devmode/' . Core::$project . '/');
     } else {
         $url_asstes = URL_ASSETS;
         list($file, $query) = explode('?', $uri . '?', 2);
         $uri = $file . '?' . (strlen($query) > 0 ? $query . '&' : '') . Core::assets_hash($file);
     }
     return $url_asstes . $url;
 }
开发者ID:myqee,项目名称:core,代码行数:18,代码来源:core.class.php

示例12: image

 /**
  * Creates a image link.
  *
  * echo HTML::image('media/img/logo.png', array('alt' => 'My Company'));
  *
  * @param   string   file name
  * @param   array	default attributes
  * @return  string
  * @uses	URL::base
  * @uses	HTML::attributes
  */
 public static function image($file, array $attributes = null, $index = false)
 {
     if (strpos($file, '://') === false) {
         // Add the base URL
         $file = Core::url()->base($index) . $file;
     }
     // Add the image link
     $attributes['src'] = $file;
     return '<img' . HTML::attributes($attributes) . ' />';
 }
开发者ID:google2013,项目名称:myqeecms,代码行数:21,代码来源:HTML.class.php

示例13: rgba

<?php

$static_url = Core::url('/statics/skins/default/');
?>
<style type="text/css">
#calendar-div{
    position:absolute;
    right:335px;
    top:50px;
    width:160px;
    height: 176px;
    background:url(<?php 
echo $static_url;
?>
weather_bg_l.png);
    text-shadow:1px 1px 0 rgba(0,0,0,0.5);
    color:rgba(255,255,255,0.9);
    font-size:1.2em;
    -webkit-background-size:100% 100%;
    background-size:100% 100%;
}
#calendar-date,#calendar-date-chinese{position:absolute;width:154px;height:18px;line-height:16px;overflow:hidden;margin:10px 0 0 6px;text-align:center;white-space:nowrap;}
#calendar-date-chinese{margin:148px 0 0 6px;}
.calender-num{position:absolute;margin:37px 0 0 25px;}
.calender-num span{background-image:url(<?php 
echo $static_url;
?>
weather_nums.png);background-repeat:no-repeat;float:left;width:55px;height:107px;-webkit-background-size:550px 107px;background-size:550px 107px;}
.calendar-num-0{background-position:0 0;}
.calendar-num-1{background-position:-55px 0;}
.calendar-num-2{background-position:-110px 0;}
开发者ID:google2013,项目名称:myqee,代码行数:31,代码来源:default.view.php

示例14: change_zdy_parm

    var groups_form = group_ids.join(',');
    if ( now_groups_form==groups_form )
    {
        //直接切换显示
        MyQEE.$('mytag_main_1').style.display='none';
        MyQEE.$('mytag_main_2').style.display='';
        MyQEE.$('step_tag_1').className='';
        MyQEE.$('step_tag_2').className='hover';

        change_zdy_parm();
        return ;
    }

    _is_run_ajax = true;
    var ajax = new MyQEE.ajax('<?php 
echo Core::url('administrator/edit_perm_form/' . $member->id);
?>
');
    ajax.method = 'GET';
    ajax.setVar('group_ids',group_ids);
    ajax.onError = function()
    {
        _is_run_ajax = false;
        MyQEE.$('step1_loading').style.display='none';
        MyQEE.Msg('数据请求失败,请重试。');
    }

    ajax.onCompletion = function()
    {
        _is_run_ajax = false;
        MyQEE.$('step1_loading').style.display='none';
开发者ID:xiaodin1,项目名称:myqee,代码行数:31,代码来源:form.view.php

示例15:

            ?>
 onclick="MyQEE.ask_todo('<?php 
            echo Core::url('administrator/delete/' . $item->id);
            ?>
','您确认要删除此用户?')" />
        </td>
    </tr>
    <?php 
        }
    }
    ?>
    <tr>
        <td class="td1" colspan="7"> </td>
        <td class="td1" align="center">
        <input type="button" class="submit" value="创建新用户" onclick="goto('<?php 
    echo Core::url('administrator/add');
    ?>
')" />
        </td>
    </tr>
</table>

<center>
<?php 
    echo $pagehtml;
    ?>
</center>
<?php 
} else {
    ?>
<table class="mainTalbe">
开发者ID:xiaodin1,项目名称:myqee,代码行数:31,代码来源:list.view.php


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