• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setUri函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: update

     update('pagers', $g, "post_id = '{$urledit}' ");
 }
 if (!empty($_POST['medidas'])) {
     $h['post_id'] = $postedit['id'];
     $h['measure'] = htmlspecialchars(mysql_real_escape_string($_POST['medidas']));
     update('measures', $h, "post_id = '{$urledit}' ");
 }
 if (!empty($_POST['papel_tipo'])) {
     $i['post_id'] = $postedit['id'];
     $i['paper_type'] = htmlspecialchars(mysql_real_escape_string($_POST['papel_tipo']));
     update('papers', $i, "post_id = '{$urledit}' ");
 }
 $f['data'] = formDate($f['date']);
 unset($f['date']);
 if ($postedit['titulo'] != $f['titulo']) {
     $f['url'] = setUri($f['titulo']);
     $readPostUri = read('posts', "WHERE url LIKE  '%{$f['url']}%' AND id != '{$urledit}'");
     if ($readPostUri) {
         $f['url'] = $f['url'] . '-' . count($readPostUri);
         $readPostUri = read('posts', "WHERE url = '{$f['url']}' AND id != '{$urledit}'");
         if ($readPostUri) {
             $f['url'] = $f['url'] . '_' . time();
         }
     }
 } else {
     $f['url'] = $postedit['url'];
 }
 if (!empty($_FILES['thumb']['tmp_name'])) {
     $pasta = '../uploads/';
     $ano = date('Y');
     $mes = date('m');
开发者ID:sparsis,项目名称:vizam,代码行数:31,代码来源:posts-edit.php


示例2: define

    //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
    define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
if (function_exists('ini_set')) {
    ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS);
    define('APP_PATH', null);
    define('CORE_PATH', null);
} else {
    define('APP_PATH', ROOT . DS . APP_DIR . DS);
    define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
require CORE_PATH . 'cake' . DS . 'basics.php';
require APP_PATH . 'config' . DS . 'core.php';
require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
$bootstrap = true;
$uri = setUri();
/**
 * As mod_rewrite (or .htaccess files) is not working, we need to take care
 * of what would normally be rewritten, i.e. the static files in app/webroot/
 */
if ($uri === '/' || $uri === '/index.php') {
    $_GET['url'] = '/';
    require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
} else {
    $elements = explode('/index.php', $uri);
    if (!empty($elements[1])) {
        $path = $elements[1];
    } else {
        $path = '/';
    }
    $_GET['url'] = $path;
开发者ID:uwitec,项目名称:eduoa,代码行数:31,代码来源:index.php


示例3: htmlspecialchars

        echo '<span class="alert alert-error" style="float:left;">Desculpe, Voc&ecirc; n&atilde;o tem permiss&atilde;o para gerenciar as categorias!</span>';
    } else {
        ?>
<section class="span8">       
<a href="index2.php?exe=posts/categorias" title="Voltar" class="pull-right btn-primary">Voltar</a>       
<?php 
        if (isset($_POST['sendForm'])) {
            $f['nome'] = htmlspecialchars(stripcslashes(mysql_real_escape_string($_POST['nome'])));
            $f['date'] = htmlspecialchars(stripcslashes(mysql_real_escape_string($_POST['data'])));
            $f['tipo'] = 'dropmenu';
            if (in_array('', $f)) {
                echo '<span class="alert alert-info" style="float:left;">Preencha todos os Campos!</span>';
            } else {
                $f['data'] = formDate($f['date']);
                unset($f['date']);
                $f['url'] = setUri($f['nome']);
                $readCatUri = read('cat', "WHERE url LIKE  '%{$f['url']}%'");
                if ($readCatUri) {
                    $f['url'] = $f['url'] . '-' . count($readCatUri);
                    $readCatUri = read('cat', "WHERE url = '{$f['url']}'");
                    if ($readCatUri) {
                        $f['url'] = $f['url'] . '_' . time();
                    }
                }
                create('cat', $f);
                $_SESSION['return'] = '<span class="alert alert-success">Categoria criada com sucesso!</span>';
                header('Location: index2.php?exe=posts/categorias-create');
            }
        } elseif (!empty($_SESSION['return'])) {
            echo $_SESSION['return'];
            unset($_SESSION['return']);
开发者ID:sparsis,项目名称:vizam,代码行数:31,代码来源:categorias-create.php


示例4: htmlspecialchars

            }
        }
        ?>
<section class="span8">        
<a href="index2.php?exe=posts/categorias" title="Voltar" class="pull-right btn-primary">Voltar</a> 
<?php 
        if (isset($_POST['sendForm'])) {
            $f['nome'] = htmlspecialchars(stripcslashes(mysql_real_escape_string($_POST['nome'])));
            $f['date'] = htmlspecialchars(stripcslashes(mysql_real_escape_string($_POST['data'])));
            if (in_array('', $f)) {
                echo '<span class="alert alert-info">Preencha todos os Campos!</span>';
            } else {
                $f['id_pai'] = $urlpai;
                $f['data'] = formDate($f['date']);
                unset($f['date']);
                $f['url'] = $prefix . '-' . setUri($f['nome']);
                $readCatUri = read('cat', "WHERE url LIKE  '%{$f['url']}%'");
                if ($readCatUri) {
                    $f['url'] = $f['url'] . '-' . count($readCatUri);
                    $readCatUri = read('cat', "WHERE url = '{$f['url']}'");
                    if ($readCatUri) {
                        $f['url'] = $f['url'] . '_' . time();
                    }
                }
                create('cat', $f);
                $_SESSION['return'] = '<span class="alert alert-success">Categoria atualizada com sucesso!</span>';
                header('Location: index2.php?exe=posts/categorias-subcreate&idpai=' . $urlpai . '&uri=' . $prefix);
            }
        } elseif (!empty($_SESSION['return'])) {
            echo $_SESSION['return'];
            unset($_SESSION['return']);
开发者ID:sparsis,项目名称:vizam,代码行数:31,代码来源:categorias-subcreate.php


示例5: date

              <?php 
if (isset($_POST['sg'])) {
    if (!empty($_FILES['thumb']['tmp_name'])) {
        $pasta = "../upload/";
        $ano = date('Y');
        $mes = date('m');
        if (!file_exists($pasta . $ano) && is_dir($pasta . $ano)) {
            mkdir($pasta . $ano, 0755);
        }
        if (!file_exists($pasta . $ano . '/' . $mes)) {
            mkdir($pasta . $ano . '/' . $mes, 0755);
        }
        $img = $_FILES['thumb'];
        $ext = substr($img['name'], -3);
        $thumb = $ano . '/' . $mes . '/' . setUri($img['name']);
        uploadImage($img['tmp_name'], setUri($img['name']), '600', $pasta . $ano . '/' . $mes . '/');
    }
    $d = date('Y-m-d H:i:s');
    $campos = array('post_id' => $postId, 'img' => $thumb, 'data' => $d);
    create("galeria", $campos);
}
?>
        
              <?php 
// deleta imagem no bando e na pasta upload
if (!empty($_GET['iddel'])) {
    $iddel = $_GET['iddel'];
    $img = $_GET['img'];
    $pasta = $pasta = "../upload/";
    if (file_exists($pasta . $img)) {
        unlink($pasta . $img);
开发者ID:wilsonazer,项目名称:santodaime,代码行数:31,代码来源:gallery.php


示例6: printAuth

    }
}
/**
* Security DATA PRINT for API AUTH
*
* @category   Pulse
* @package    Pulse
* @author     Ferdinand Martin
* @since      File available since Release 1.0.0
*/
function printAuth()
{
    return json_encode(array('PubicKey' => $_SESSION['rest.pu']));
}
/**
* Security ERROR PRINT for API AUTH
*
* @category   Pulse
* @package    Pulse
* @author     Ferdinand Martin
* @since      File available since Release 1.0.0
*/
function errorAuth()
{
    return json_encode(array('status' => 'error', 'code' => '401', 'message' => 'Authorization Required.', 'exception' => 'Missing public-key authorization header.'));
}
// @URIs External URL definition
setUri('documentationUrl', 'http://doc.pulseframework.com');
setUri('communityUrl', 'http://doc.pulseframework.com');
setUri('tutosUrl', 'http://doc.pulseframework.com');
开发者ID:ferdinandmartin,项目名称:pulse,代码行数:30,代码来源:Default.php


示例7: baseUrl

 /**
  * Returns a base URL.
  *
  * @return string	Base URL
  */
 function baseUrl()
 {
     $htaccess = null;
     $base = $this->admin;
     $this->webroot = '';
     if (defined('BASE_URL')) {
         $base = BASE_URL . $this->admin;
     }
     $docRoot = env('DOCUMENT_ROOT');
     $scriptName = env('PHP_SELF');
     $r = null;
     $appDirName = str_replace('/', '\\/', preg_quote(APP_DIR));
     $webrootDirName = str_replace('/', '\\/', preg_quote(WEBROOT_DIR));
     if (preg_match('/' . $appDirName . '\\' . DS . $webrootDirName . '/', $docRoot)) {
         $this->webroot = '/';
         if (preg_match('/^(.*)\\/index\\.php$/', $scriptName, $r)) {
             if (!empty($r[1])) {
                 return $base . $r[1];
             }
         }
     } else {
         if (defined('BASE_URL')) {
             $webroot = setUri();
             $htaccess = preg_replace('/(?:' . APP_DIR . '\\/(.*)|index\\.php(.*))/i', '', $webroot) . APP_DIR . '/' . $webrootDirName . '/';
         }
         if (preg_match('/^(.*)\\/' . $appDirName . '\\/' . $webrootDirName . '\\/index\\.php$/', $scriptName, $regs)) {
             if (APP_DIR === 'app') {
                 $appDir = null;
             } else {
                 $appDir = '/' . APP_DIR;
             }
             !empty($htaccess) ? $this->webroot = $htaccess : ($this->webroot = $regs[1] . $appDir . '/');
             return $base . $regs[1] . $appDir;
         } elseif (preg_match('/^(.*)\\/' . $webrootDirName . '([^\\/i]*)|index\\\\.php$/', $scriptName, $regs)) {
             !empty($htaccess) ? $this->webroot = $htaccess : ($this->webroot = $regs[0] . '/');
             return $base . $regs[0];
         } else {
             !empty($htaccess) ? $this->webroot = $htaccess : ($this->webroot = '/');
             return $base;
         }
     }
     return $base;
 }
开发者ID:sukhjeet81,项目名称:capuchn,代码行数:48,代码来源:dispatcher.php


示例8: mysql_real_escape_string

?>
/tpl/images/logo.png" alt="Logo <?php 
echo SITENAME;
?>
" title="<?php 
echo SITENAME;
?>
 - Entretenimento, games, internet e tecnologia" />
        </a>
    </div><!-- /header-logo -->
    
    <div class="search">
    	<?php 
if (isset($_POST['search'])) {
    $pesquisa = mysql_real_escape_string($_POST['s']);
    $pesquisa = setUri($pesquisa);
    header('Location: ' . BASE . '/pesquisa/' . $pesquisa);
}
?>
    	<form name="search" action="" method="post">
        	<label><input type="text" name="s" value="" /></label>
            <input type="submit" class="btn" value="" name="search" />
        </form>
    </div><!-- /headr-search -->
    
    <ul class="hnav">
    	<li><a title="<?php 
echo SITENAME;
?>
 | Home" href="<?php 
setHome();
开发者ID:BrunoPastorello,项目名称:php-estudos,代码行数:31,代码来源:header.php


示例9: htmlspecialchars

if (function_exists(getUser)) {
    if (!getUser($_SESSION['autUser']['id'], '1')) {
        echo '<span class="alert alert-error" style="float:left;">Desculpe, Voc&ecirc; n&atilde;o tem permiss&atilde;o para gerenciar as cores!</span>';
    } else {
        ?>
<section class="span8">
<a href="index2.php?exe=system/cores" title="Artigos" class="pull-right label label-info">Listar Cores</a>
<?php 
        if (isset($_POST['sendForm'])) {
            $f['color_name'] = htmlspecialchars(mysql_real_escape_string($_POST['color_name']));
            $f['color_hexadecimal'] = htmlspecialchars(mysql_real_escape_string($_POST['color_hexadecimal']));
            $f['color_rgb'] = htmlspecialchars(mysql_real_escape_string($_POST['color_rgb']));
            if (in_array('', $f)) {
                echo '<span class="alert alert-info">Informe todos os Campos!</span>';
            } else {
                $f['color_name_url'] = setUri($f['color_name']);
                $readPostUri = read('colors', "WHERE color_name_url LIKE  '%{$f['color_name_url']}%'");
                if ($readPostUri) {
                    $f['color_name_url'] = $f['color_name_url'] . '-' . count($readPostUri);
                    $readPostUrl = read('colors', "WHERE color_name_url = '{$f['color_name_url']}'");
                    if ($readPostUrl) {
                        $f['color_name_url'] = $f['color_name_url'] . '_' . time();
                    }
                }
                create('colors', $f);
                $_SESSION['return'] = '<span class="alert alert-success">Categoria criada com sucesso!</span>';
                header('Location: index2.php?exe=system/cores-create');
            }
        } elseif (!empty($_SESSION['return'])) {
            echo $_SESSION['return'];
            unset($_SESSION['return']);
开发者ID:sparsis,项目名称:vizam,代码行数:31,代码来源:cores-create.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setUserActive函数代码示例发布时间:2022-05-15
下一篇:
PHP setUpdatedLatLng函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap