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


PHP string::addSlashes方法代码示例

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


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

示例1: _save

 function _save()
 {
     $page_id = params::get('page_id');
     db::table('pages');
     db::where('page_id', $page_id);
     $page = db::assoc();
     $page_folder_old = $page['page_folder'];
     $page_content = params::get('page_content');
     $page_folder = params::get('page_folder');
     $page_parent = params::get('page_parent');
     $page_dynamic = params::isCheck('page_dynamic');
     if ($page_dynamic == 1) {
         $page_folder = '[dynamic]';
     }
     $page_level = 0;
     if ($page_folder != '/') {
         $page_folder = string::translateSoft(string::clearBoth($page_folder));
         if ($page_parent == 0) {
             $page_folder = string::addSlashes($page_folder);
         } else {
             db::table('pages');
             db::where('page_id', $page_parent);
             $parent_folder = db::get('page_folder');
             $page_folder = $parent_folder . $page_folder . '/';
         }
         $page_level = count(explode('/', string::clearBoth($page_folder)));
     }
     db::table('pages');
     db::where('page_id', $page_id);
     db::update(array('page_date' => 'NOW()', 'page_title' => params::get('page_title'), 'page_header' => params::get('page_header'), 'tmpl_id' => params::get('tmpl_id'), 'page_parent' => $page_parent, 'page_keywords' => params::get('page_keywords'), 'page_descriptions' => params::get('page_descriptions'), 'page_map' => params::isCheck('page_map'), 'page_cache' => params::isCheck('page_cache'), 'page_pub' => params::isCheck('page_pub'), 'page_folder' => $page_folder, 'page_content' => $page_content[0], 'page_handler' => params::isCheck('page_handler'), 'page_dynamic' => $page_dynamic, 'page_level' => $page_level));
     db::table('menus_points');
     db::where('site_id', ADMIN_SITE_ID);
     db::where('point_link', $page_folder_old);
     db::update('point_link', $page_folder);
     if (events::detect('save')) {
         $date = date('Y-m-d H:i:s');
         self::saveVersion($date, $page_id, $page_content);
     }
     unset($page_content[0]);
     if ($page_content) {
         foreach ($page_content as $k => $v) {
             db::table('pages_content');
             db::where('content_id', $k);
             db::update('content', $v);
         }
     }
     $files = params::get('files_id');
     if ($files) {
         foreach ($files as $v) {
             db::table('pages_files');
             db::where('file_id', $v);
             db::update(array('page_id' => $page_id));
         }
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:55,代码来源:main.module.php

示例2: addPoint

 function addPoint()
 {
     $menu_id = params::get('menu_id');
     $page_id = params::get('page_id');
     if ($page_id == 0) {
         $point_link = params::get('point_link');
         if (strstr($point_link, 'http://') === false) {
             $point_link = string::addSlashes(string::clearBoth(params::get('point_link')));
         }
     } else {
         db::table('pages');
         db::where('page_id', $page_id);
         $point_link = db::get('page_folder');
     }
     $array = array('point_parent' => 0, 'point_name' => params::get('point_name'), 'point_link' => $point_link, 'point_order' => 0, 'point_pub' => '1', 'point_tmpl_link' => params::get('point_tmpl_link'), 'point_tmpl_act' => params::get('point_tmpl_act'), 'point_tmpl_inact' => params::get('point_tmpl_inact'), 'menu_id' => $menu_id, 'site_id' => ADMIN_SITE_ID);
     db::table('menus_points');
     db::smartInsert($array);
     self::showPoints($menu_id);
 }
开发者ID:rigidus,项目名称:ea,代码行数:19,代码来源:main.module.php

示例3: getThisPageTree

 public function getThisPageTree()
 {
     $link = array();
     $request = string::clearBoth(URI_SELF);
     if (empty($request)) {
         $link[0] = '/';
         return $link;
     }
     $arr = explode('/', $request);
     $count = count($arr);
     for ($z = 0; $z < $count; $z++) {
         unset($arr[$count - $z]);
         $link[$z + 1] = string::addSlashes(implode('/', $arr));
     }
     $link[0] = '/';
     return array_reverse($link);
 }
开发者ID:rigidus,项目名称:ea,代码行数:17,代码来源:web.php


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