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


PHP siteUrl函数代码示例

本文整理汇总了PHP中siteUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP siteUrl函数的具体用法?PHP siteUrl怎么用?PHP siteUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: url

 public function url(string $url = '') : Ajax
 {
     // Veri bir url içermiyorsa siteUrl yöntemi ile url'ye dönüştürülür.
     if (!isUrl($url)) {
         $url = siteUrl($url);
     }
     $this->sets['url'] = "\turl:\"{$url}\"," . EOL;
     return $this;
 }
开发者ID:znframework,项目名称:znframework,代码行数:9,代码来源:Ajax.php

示例2: currentUrl

/**
 * Digunakan untuk mendapatkan URL saat ini
 *
 * @param   string  $permalink  URL tambahan bila perlu
 * @return  string
 */
function currentUrl($permalink = '', $trim = false)
{
    $req = !empty($_GET) ? '?' . http_build_query($_GET) : '';
    $url = siteUrl(app('uri')->path() . $req);
    if ($permalink) {
        $permalink = '/' . $permalink;
    }
    if ($trim === true) {
        $url = rtrim($url, '/');
    }
    return $url . $permalink;
}
开发者ID:FaddliLWibowo,项目名称:tokonlen,代码行数:18,代码来源:common.php

示例3: url

 public function url($url = '')
 {
     if (!is_string($url)) {
         Error::set(lang('Error', 'stringParameter', '1.(url)'));
         return $this;
     }
     // Veri bir url içermiyorsa siteUrl yöntemi ile url'ye dönüştürülür.
     if (!isUrl($url)) {
         $url = siteUrl($url);
     }
     $this->sets['url'] = "\turl:\"{$url}\"," . eol();
     return $this;
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:13,代码来源:JQAjax.php

示例4: do

 public function do(string $email = NULL, string $returnLinkPath = NULL) : bool
 {
     $email = Properties::$parameters['email'] ?? $email;
     $returnLinkPath = Properties::$parameters['returnLink'] ?? $returnLinkPath;
     Properties::$parameters = [];
     // ------------------------------------------------------------------------------
     // Settings
     // ------------------------------------------------------------------------------
     $tableName = INDIVIDUALSTRUCTURES_USER_CONFIG['matching']['table'];
     $senderInfo = INDIVIDUALSTRUCTURES_USER_CONFIG['emailSenderInfo'];
     $getColumns = INDIVIDUALSTRUCTURES_USER_CONFIG['matching']['columns'];
     $usernameColumn = $getColumns['username'];
     $passwordColumn = $getColumns['password'];
     $emailColumn = $getColumns['email'];
     // ------------------------------------------------------------------------------
     if (!empty($emailColumn)) {
         DB::where($emailColumn, $email);
     } else {
         DB::where($usernameColumn, $email);
     }
     $row = DB::get($tableName)->row();
     if (isset($row->{$usernameColumn})) {
         if (!isUrl($returnLinkPath)) {
             $returnLinkPath = siteUrl($returnLinkPath);
         }
         $encodeType = INDIVIDUALSTRUCTURES_USER_CONFIG['encode'];
         $newPassword = Encode::create(10);
         $encodePassword = !empty($encodeType) ? Encode::type($newPassword, $encodeType) : $newPassword;
         $templateData = array('usernameColumn' => $row->{$usernameColumn}, 'newPassword' => $newPassword, 'returnLinkPath' => $returnLinkPath);
         $message = Import::template('UserEmail/ForgotPassword', $templateData, true);
         Email::sender($senderInfo['mail'], $senderInfo['name'])->receiver($email, $email)->subject(lang('IndividualStructures', 'user:newYourPassword'))->content($message);
         if (Email::send()) {
             if (!empty($emailColumn)) {
                 DB::where($emailColumn, $email);
             } else {
                 DB::where($usernameColumn, $email);
             }
             if (DB::update($tableName, [$passwordColumn => $encodePassword])) {
                 return $this->success = lang('IndividualStructures', 'user:forgotPasswordSuccess');
             }
             return !($this->error = lang('Database', 'updateError'));
         } else {
             return !($this->error = lang('IndividualStructures', 'user:emailError'));
         }
     } else {
         return !($this->error = lang('IndividualStructures', 'user:forgotPasswordError'));
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:48,代码来源:ForgotPassword.php

示例5: _initialize

 public function _initialize()
 {
     $res = CMS_M('website')->where('website_id=' . get_site_id())->find();
     if (empty($_SESSION['tplPath'])) {
         $_SESSION['tplPath'] = 'Templates/' . trim($res['weburl']);
     }
     if (empty($_SESSION['siteUrl'])) {
         $_SESSION['siteUrl'] = siteUrl(get_site_id());
     }
     //站点地址
     $this->assign('siteUrl', $_SESSION['siteUrl']);
     //面包屑导航
     $this->assign('site_nav', site_nav());
     $this->assign('defaultPath', './Admin/Tpl/Templates/default');
     $this->header();
     $this->footer();
 }
开发者ID:huang81820,项目名称:mycms,代码行数:17,代码来源:ContentAction.class.php

示例6: settings

 public function settings(array $config = []) : InternalPagination
 {
     $configs = VIEWOBJECTS_PAGINATION_CONFIG;
     // ---------------------------------------------------------------------------------------
     // Sayfalama Ayarlarını İçeren Değişkenler
     // ---------------------------------------------------------------------------------------
     if (isset($config['totalRows'])) {
         $this->totalRows = $config['totalRows'];
     }
     if (isset($config['start'])) {
         $this->start = $config['start'];
     }
     if (isset($config['limit'])) {
         $this->limit = $config['limit'];
     }
     if (isset($config['countLinks'])) {
         $this->countLinks = $config['countLinks'];
     }
     if (isset($config['prevName'])) {
         $this->prevTag = $config['prevName'];
     }
     if (isset($config['nextName'])) {
         $this->nextTag = $config['nextName'];
     }
     if (isset($config['firstName'])) {
         $this->firstTag = $config['firstName'];
     }
     if (isset($config['lastName'])) {
         $this->lastTag = $config['lastName'];
     }
     if (isset($config['type'])) {
         $this->type = $config['type'];
     }
     $this->class = array_merge($configs['class'], isset($config['class']) ? $config['class'] : []);
     $this->style = array_merge($configs['style'], isset($config['style']) ? $config['style'] : []);
     if (isset($config['url']) && $this->type !== 'ajax') {
         $this->url = suffix(siteUrl($config['url']));
     } elseif ($this->type === 'ajax') {
         $this->url = '#prow=';
     } else {
         $this->url = suffix(CURRENT_CFURL);
     }
     // ---------------------------------------------------------------------------------------
     return $this;
 }
开发者ID:znframework,项目名称:znframework,代码行数:45,代码来源:InternalPagination.php

示例7: redirect

function redirect(string $url, int $time = 0, array $data = [], bool $exit = true)
{
    if (!isUrl($url)) {
        $url = siteUrl($url);
    }
    if (!empty($data)) {
        foreach ($data as $k => $v) {
            Session::insert('redirect:' . $k, $v);
        }
    }
    if ($time > 0) {
        sleep($time);
    }
    header("Location: {$url}", true);
    if ($exit === true) {
        exit;
    }
}
开发者ID:znframework,项目名称:znframework,代码行数:18,代码来源:Redirect.php

示例8: form

 public function form($id = "")
 {
     if (empty($id)) {
         $head['title'] = 'Yönetici Ekle';
         $head['meta']['author'] = 'Bursa yazılım';
         $headData["kullaniciAdi"] = User::data()->username;
         $bodyVeri["data"] = ['action' => siteUrl('yonetim/ekle')];
         $bodyVeri["data"] = ['action' => siteUrl('yonetim/ekle'), 'yoneticiDetay' => ["username" => "", "pass" => "", "email" => "", "isim" => "", "soyisim" => "", "durum" => "", "ban_durum" => ""]];
     } else {
         $head['title'] = 'Yönetici Düzenle';
         $head['meta']['author'] = 'Bursa yazılım';
         $headData["kullaniciAdi"] = User::data()->username;
         $yoneticiDetay = $this->yonetici->detay($id);
         $bodyVeri["data"] = ['action' => siteUrl('yonetim/duzenle/' . $id), 'yoneticiDetay' => $yoneticiDetay];
     }
     $data['head'] = Import::view('head', $headData, true);
     $data['footer'] = Import::view('footer', '', true);
     $data['body'] = Import::view('yonetimForm', $bodyVeri, true);
     Import::masterPage($data, $head);
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:20,代码来源:yonetim.php

示例9: anchor

/**
 * Setup Anchor tag
 *
 * @param   mixed   $url    Path or Permalink
 * @param   string  $label  Text label
 * @return  string
 */
function anchor($url, $label = '', array $extras = [])
{
    if (is_array($url) and $label == '') {
        $attrs = $url;
        $label = $attrs['label'];
        unset($attrs['label']);
    } else {
        $attrs = ['href' => $url];
    }
    $attrs = array_merge($extras, $attrs);
    if ($attrs['href'] == '' || substr($attrs['href'], 0, 2) != '//') {
        $attrs['href'] = siteUrl($attrs['href']);
    } elseif (strpos('?', $attrs['href']) === 1) {
        $attrs['href'] = currentUrl($attrs['href'], true);
    }
    if (!isset($attrs['class']) or isset($attrs['class']) and strpos($attrs['class'], 'btn') === false) {
        $attrs['tabindex'] = '-1';
    }
    return '<a ' . parseAttrs($attrs) . '>' . $label . '</a>';
}
开发者ID:tommyputranto,项目名称:tokonlen,代码行数:27,代码来源:html.php

示例10: testSiteUrl

 /**
  * サイトの設置URLを取得する
  */
 public function testSiteUrl()
 {
     if (isConsole()) {
         $this->assertEquals('http://localhost/', siteUrl());
     } else {
         $topLevelUrl = topLevelUrl(false);
         Configure::write('App.baseUrl', '/test/');
         $this->assertEquals($topLevelUrl . '/test/', siteUrl());
         Configure::write('App.baseUrl', '/test/index.php');
         $this->assertEquals($topLevelUrl . '/test/', siteUrl());
         Configure::write('App.baseUrl', '/test/hoge/');
         $this->assertEquals($topLevelUrl . '/test/hoge/', siteUrl());
     }
 }
开发者ID:baserproject,项目名称:basercms,代码行数:17,代码来源:BcBasicsTest.php

示例11: _createInstallFile

 /**
  * インストールファイルを生成する
  *
  * @return boolean
  * @access	protected
  */
 function _createInstallFile()
 {
     $corefilename = CONFIGS . 'install.php';
     $siteUrl = siteUrl();
     $installCoreData = array("<?php", "Configure::write('Security.salt', '" . $this->Session->read('Installation.salt') . "');", "Configure::write('Baser.firstAccess', true);", "Configure::write('Baser.siteUrl', '{$siteUrl}');", "Configure::write('Baser.sslUrl', '');", "Configure::write('Baser.adminSslOn', false);", "Configure::write('Baser.mobile', true);", "Configure::write('Baser.smartphone', true);", "Configure::write('Cache.disable', false);", "Cache::config('default', array('engine' => 'File'));", "?>");
     if (file_put_contents($corefilename, implode("\n", $installCoreData))) {
         return chmod($corefilename, 0666);
     } else {
         return false;
     }
 }
开发者ID:nazo,项目名称:phpcondo,代码行数:17,代码来源:installations_controller.php

示例12: confirm

    ?>
            </td>
        </tr>   

       <?php 
}
?>

        </tbody>
        </thead>
    </table>
    
    <button type="submit" id="valider_lot" name="valider_lot" style="margin-left:35%;float:left" class="btn btn-primary" onclick="return confirm('Valider les lots ?');">Valider les lots</button>
</form>
<form id="generer_etiquettes" style="margin-bottom: 0%" action="<?php 
echo siteUrl(9, array('act' => 'generer_etiquettes'), true);
?>
" method="post">
    <button type="submit" name="generer_etiquettes" style="margin-left:5%;float:left" class="btn btn-success">Générer les étiquettes</button>
</form>


<h3 style="margin-top:8%" class="page-header">
Envoyés
</h3>
<table id="tab_lots_envoyes" class="table table-striped table-bordered table-hover" >
    <thead>
        <tr>
        <th>Nom</th>
        <th>Adresse</th>
        <th>Code Postal</th>
开发者ID:jperreau24,项目名称:ProjectTournament,代码行数:31,代码来源:lot_vue.php

示例13: defined

<?php

defined('ROOT') or die('Not allowed!');
?>
<div id="main-sidebar" class="fright">
    <div class="widget">
        <h4 class="widget-title">Pencarian</h4>
        <form action="<?php 
echo siteUrl('shop');
?>
" method="get" id="product-search">
            <input type="search" name="search" id="search">
            <input type="submit" id="s-btn" class="btn" value="Cari">
        </form>
    </div>
    <div class="widget">
        <h4 class="widget-title">Kategori</h4>
        <ul class="widget-content">
        <?php 
if (count($kategori) > 0) {
    foreach ($kategori as $row) {
        ?>
            <li><?php 
        echo anchor('shop/index/category/' . $row->alias, $row->nama);
        ?>
</li>
        <?php 
    }
} else {
    ?>
            <li>Kategori kosong.</li>
开发者ID:tommyputranto,项目名称:tokonlen,代码行数:31,代码来源:sidebar.php

示例14: redirect

function redirect($url = '', $time = 0, $data = array(), $exit = true)
{
    if (!is_string($url) || empty($url)) {
        return false;
    }
    if (!is_numeric($time)) {
        $time = '0';
    }
    if (!is_bool($exit)) {
        $exit = true;
    }
    if (!isUrl($url)) {
        $url = siteUrl($url);
    }
    if (!empty($data)) {
        if (!isset($_SESSION)) {
            session_start();
        }
        foreach ($data as $k => $v) {
            $_SESSION[md5('redirect:' . $k)] = $v;
        }
    }
    if ($time === 0) {
        header("Location: {$url}", true);
    } else {
        sleep($time);
        header("Location: {$url}", true);
    }
    if ($exit === true) {
        exit;
    }
}
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:32,代码来源:Functions.php

示例15: _activation

 protected function _activation($user, $pass, $activationReturnLink, $email)
 {
     $url = suffix($activationReturnLink);
     if (!isUrl($url)) {
         $url = siteUrl($url);
     }
     $senderInfo = INDIVIDUALSTRUCTURES_USER_CONFIG['emailSenderInfo'];
     $templateData = ['url' => $url, 'user' => $user, 'pass' => $pass];
     $message = Import::template('UserEmail/Activation', $templateData, true);
     $user = $email ?? $user;
     Email::sender($senderInfo['mail'], $senderInfo['name'])->receiver($user, $user)->subject(lang('IndividualStructures', 'user:activationProcess'))->content($message);
     if (Email::send()) {
         return $this->success = lang('IndividualStructures', 'user:activationEmail');
     } else {
         return !($this->error = lang('IndividualStructures', 'user:emailError'));
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:17,代码来源:Register.php


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