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

PHP get_dirname函数代码示例

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

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



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

示例1: removeButton

function removeButton(i){
   $("#remove-recipes-"+i).removeClass("hidden");
   $("#remove-recipes-"+i).fadeIn("fast");
   $("#btn-news-"+i).attr('style','z-index:1000; position:absolute');
	  
   $("#recipes-"+i).mouseleave(function(){
      $("#remove-recipes-"+i).fadeOut("fast");
   });
}

function clearImage(i){
   $("#upload-recipes-"+i).attr('src', '');
   $("#upload-recipes-"+i).addClass("hidden");
   $('#custom-recipe').html('<input type="file" name="upload_news_1" id="news-1" onchange="readURL(this,1)" class="hidden"/>');
   $("#recipes-flag").val('');
}

function cancelEdit(){
   location.href = "http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-detail/" . $request_recipe_name;
?>
";
}
</script>

<?php 
$sql = "UPDATE tbl_recipes SET `category_recipes` = '{$post_category_recipes}',\n                                    `recipe_name` = '{$post_recipe_name}',\n\t\t\t\t\t\t\t\t\t`recipe_image` = '{$post_recipe_image}',\n\t\t\t\t\t\t\t\t\t`recipe_date` = '{$post_recipe_date}',\n\t\t\t\t\t\t\t\t\t`recipe_ingredients` = '{$post_recipe_ingredients}',\n\t\t\t\t\t\t\t\t\t`recipe_sauce` = '{$post_recipe_sauce}',\n\t\t\t\t\t\t\t\t\t`method` = '{$post_recipe_method}',\n\t\t\t\t\t\t\t\t\t`alias` = '{$post_recipe_alias}',\n\t\t\t\t\t\t\t\t\t`visibility_status` = '{$post_recipe_visibility}',\n\t\t\t\t\t\t\t\t\t`additional` = '{$post_recipe_additional}'\n\t\t\t WHERE `recipe_id` = '{$post_recipe_id}'";
echo $sql;
?>

            
开发者ID:nickyudha,项目名称:spalosophy,代码行数:29,代码来源:edit.php


示例2: on_rename

 private function on_rename()
 {
     $path = $this->path;
     $old_name = gpc('fs-oname');
     $new_name = gpc('fs-nname');
     $old_path = get_dirname($path) . '/' . $new_name;
     $new_path = get_dirname($path) . '../uploadfiles/' . $new_name;
     $this->code = $this->FileFS->rename($path, $new_path) ? 200 : 300;
     $this->mess = $this->FileFS->error();
     $this->show();
 }
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:11,代码来源:webftps.php


示例3: addslashes

$post_method = addslashes($_POST['recipe_method']);
$getRecords = getRecords($post_recipes_name);
if ($_POST['btn-add-recipes'] == "Save Changes" || $_POST['btn-add-recipes'] == "Save Changes & Exit") {
    $checkName = getName($post_recipes_name);
    if ($checkName['rows'] > 0) {
        for ($i = 0; $i <= $getRecords['rows']; $i++) {
            $recipe_name = cleanurl($post_recipes_name . randomchr());
        }
    } else {
        $recipe_name = cleanurl($post_recipes_name);
    }
    $uploads_dir = '../files/uploads/recipes_image/';
    $userfile_name = str_replace(array('(', ')', ' '), '_', $_FILES['upload_recipes_1']['name']);
    $userfile_tmp = $_FILES['upload_recipes_1']['tmp_name'];
    $prefix = 'recipes_image-';
    $prod_img = $uploads_dir . $prefix . $userfile_name;
    move_uploaded_file($userfile_tmp, $prod_img);
    $slider_image = $prefix . $userfile_name;
    $filename = "files/uploads/recipes_image/" . $slider_image;
    addNews($post_category_recipes, $post_recipes_name, $filename, $post_recipes_date, $post_ingredients, $post_sauce, $post_method, cleanurl($recipe_name), 'Visible', 'top');
    if ($_POST['btn-add-recipes'] == "Save Changes & Exit") {
        ?>
      <script>
      location.href = "http://<?php 
        echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-detail/" . cleanurl($recipe_name);
        ?>
";
	  </script>
   <?php 
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:control.php


示例4: get_dirname

$listing_order = $_get->get_categories(1, $parent_id, $search_query, $sort_by, $first_record, $query_per_page);
/* --- HANDLING ARROW SORTING --- */
$arr_order_number = '';
if (isset($_REQUEST['srt'])) {
    if ($_REQUEST['srt'] == "category_name DESC") {
        $arr_order_number = "<span class=\"sort-arrow-up\"></span>";
    } else {
        if ($_REQUEST['srt'] == "category_name") {
            $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
        } else {
            $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
        }
    }
}
/* --- STORED VALUE --- */
echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/child-category-view/" . $_REQUEST['cid'] . "/" . $_REQUEST['cname'] . "\">\n";
echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"" . $page . "\" /> \n";
echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n";
echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . ceil($full_order['total_query'] / $query_per_page) . "\" /> \n";
echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n";
echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n";
/* -- BUTTON RESET -- */
if (empty($search_parameter)) {
    $reset = "hidden";
} else {
    $reset = "";
}
/* --- BUTTON HANDLER --- */
if (isset($_POST['btn_child_category'])) {
    $category_id = $_POST['category_id'];
    if ($_POST['category-action'] == "delete") {
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:control.php


示例5:

/* --- STORED VALUE --- */
echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/news-view\">\n";
echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"".$page."\" /> \n";
echo "<input type=\"hidden\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\"";
	if($cat == '1'){
	   echo 'top';
	}else{
	   echo $req_category;
	}
echo "\" /> \n";
echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"".$query_per_page."\" /> \n";
echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"".$total_page."\" /> \n";
echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"".$sort_by."\" /> \n";
echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"".$search_parameter."-".$search_value."\" /> \n";
echo "<input type=\"hidden\" name=\"alternate-url\" id=\"alternate-url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/news\" /> \n";


/* -- BUTTON RESET -- */
if(empty($search_parameter)){
   $reset = "hidden";
}else{
   $reset = "";
}


/* --- BUTTON HANDLER --- */
if(isset($_POST['btn-index-news']) && $_POST['btn-index-news'] == 'GO'){
   
   if(!empty($_POST['news_id'])){
   
开发者ID:nickyudha,项目名称:huntstreet-v3,代码行数:29,代码来源:control.php


示例6: changeLanguage

   $('#custom_lang').html($('#custom_lang').html()+'<div id="custom_lang_select"></div>');
   
   $('#custom_lang_select').html('<br /><select class="form-control" id="id-language-option" disabled="disabled"><option value="ID" <?php 
echo $_selected_lang_id;
?>
>Indonesia</option><option value="EN" <?php 
echo $_selected_lang_en;
?>
>English</option></select>');
}


function changeLanguage(lang_dir){
   var lang = $('#lang_option option:selected').val();
   location.href = '<?php 
echo 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/';
?>
'+lang+'/'+lang_dir;
}   

function selectOptionLanguage(x){
   
   if(x != ''){
      $('#id_custom_select_lang option[value="'+x+'"]').attr('selected', true);
   }else{
      $('#id_custom_select_lang option[value="default"]').attr('selected', true);
   }

}

   
开发者ID:nickyudha,项目名称:spalosophy,代码行数:29,代码来源:index.php


示例7: connDB

}
// CALL FUNCTION
$conn = connDB();
// SELECT DATABASE
mysql_select_db("presentation", $conn);
// GET DIRNAME
function get_dirname($path)
{
    $current_dir = dirname($path);
    if ($current_dir == "/" || $current_dir == "\\") {
        $current_dir = '';
    }
    return $current_dir;
}
//STORED VALUE
echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/reporting/inventory\">\n";
?>

<?php 
/** Error reporting */
//error_reporting(E_ALL);
/** Include path **/
ini_set('include_path', ini_get('include_path') . ';../Classes/');
/** PHPExcel */
include '../../static/PHPExcel.php';
/** PHPExcel_Writer_Excel2007 */
include '../../static/PHPExcel/Writer/Excel2007.php';
// Create new PHPExcel object
echo date('H:i:s') . " Create new PHPExcel object\n";
$objPHPExcel = new PHPExcel();
// Set properties
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:export3.php


示例8: if

      $arr_type_price = "<span class=\"sort-arrow-down\"></span>";
   }else if($_REQUEST['srt'] == "type_price"){
      $arr_type_price = "<span class=\"sort-arrow-up\"></span>";
									  
   }else if($_REQUEST['srt'] == "type_visibility DESC"){
      $arr_type_visibility = "<span class=\"sort-arrow-down\"></span>";
   }else if($_REQUEST['srt'] == "type_visibility"){
      $arr_type_visibility = "<span class=\"sort-arrow-up\"></span>";
   }
   
}



/* --- STORED VALUE --- */
echo "<input type=\"text\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/product-view/".$_active_class."\">\n";
echo "<input type=\"text\" name=\"page\" id=\"page\" class=\"hidden\" value=\"".$page."\" /> \n";
echo "<input type=\"text\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\"";

if($cat == 'top'){
   echo 'top';
}else{
   echo $_REQUEST['cat'];
}

echo "\" /> \n";
echo "<input type=\"text\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"".$query_per_page."\" /> \n";
echo "<input type=\"text\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"".$total_page."\" /> \n";
echo "<input type=\"text\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"".$sort_by."\" /> \n";
echo "<input type=\"text\" name=\"search\" id=\"search\" class=\"hidden\" value=\"".$search_parameter."-".$search_value."\" /> \n";
开发者ID:nickyudha,项目名称:huntstreet-v3,代码行数:30,代码来源:control.php


示例9: get_dirname

                                             if ($act == "settings/shipping/detail/edit") {
                                                 echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/\">Home</a></li>";
                                                 echo "<li class=\"bread-arrow\"></li>";
                                                 echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping\">Settings</a></li>";
                                                 echo "<li class=\"bread-arrow\"></li>";
                                                 echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping\">Shipping</a></li>";
                                                 echo "<li class=\"bread-arrow\"></li>";
                                                 echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping/" . $courier_name['courier_id'] . "\">" . $courier_name['courier_name'] . "</a></li>";
                                                 echo "<li class=\"bread-arrow\"></li>";
                                                 echo "<li class=\"selected\">Edit: " . $courier_name['courier_name'] . "</li>";
                                                 /* STOCK MANAGER */
                                             } else {
                                                 if ($act == "products/stock/sizemanager") {
                                                     echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/\">Home</a></li>";
                                                     echo "<li class=\"bread-arrow\"></li>";
                                                     echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/stock-manager\">Products</a></li>";
                                                     echo "<li class=\"bread-arrow\"></li>";
                                                     echo "<li class=\"selected\">Stock Manager</a></li>";
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:breadcrumbs.php


示例10: header

    if($_SESSION['alert_front'] != "error"){
    	  header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/my-account/");
    }else{
    	  header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/login");
    }
    */
} else {
    if (isset($_POST['btn_confirm'])) {
        if ($_SESSION['alert'] == "error") {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/confirm");
        } else {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/admin/emails/admin_confirmed.php?act=&ornum=" . clean_alphanumeric($_POST['order_number']) . "&amount=" . clean_number($_POST['order_confirm_amount']));
        }
    } else {
        if (isset($_POST['btn_contact'])) {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/contact");
        } else {
            if (isset($_POST['btn_search'])) {
                header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shop-search/name-" . $_POST['search_bar']);
            } else {
                if ($_POST['btn_edit_account']) {
                    header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/account-details");
                } else {
                    if ($_REQUEST['act'] == "order_/wishlist" && $_SESSION['user_id'] == null) {
                        header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/login");
                    }
                }
            }
        }
    }
}
开发者ID:nickyudha,项目名称:hillpak-v2,代码行数:31,代码来源:redirect.php


示例11: get_dirname

echo $arr_courier_description;
?>
</th>
                                <th class="sort" width="250" onclick="sortBy('services')">Services<?php 
echo $arr_service;
?>
</th>
                                <th class="sort" width="190" onclick="sortBy('active_status')">Price<?php 
echo $arr_active_status;
?>
</th>
                            </tr>
                            <tr class="filter">
                                <th>
                                   <a href="http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping";
?>
" title="Reset">
                                     <input type="button" class="btn small reset <?php 
echo $reset;
?>
" value="">
                                   </a></th>
                                <th><input type="text" class="input-text" id="courier_name_search" onkeyup="searchQuery('courier_name')" onkeypress="return disableEnterKey(event)" <?php 
if ($_REQUEST['src'] == "courier_name") {
    echo "value=\"" . str_replace('\\', '/', $_REQUEST['srcval']) . "\"";
} else {
    if (!empty($_REQUEST['src'])) {
        echo "disabled";
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:index.php


示例12: header

                                 } else {
                                     if (isset($_POST['btn-index-account'])) {
                                         header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/accounts");
                                     } else {
                                         if (isset($_POST['btn_notification'])) {
                                             header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/notifications");
                                         } else {
                                             if (isset($_POST['btn_payment'])) {
                                                 header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/payment");
                                             } else {
                                                 if (isset($_POST['btn-order-confirm'])) {
                                                     header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/order-detailing/" . $_POST['redirect_order_number']);
                                                 } else {
                                                     if (isset($_POST['btn-index-confirm'])) {
                                                         if ($_POST['btn-index-confirm'] == "Submit") {
                                                             header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/confirm-payment");
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:redirect.php


示例13: preg_replace

echo preg_replace("/\n/", "\n<br>", $recipeDetails['method']);
?>
</p>
                                <textarea class="hidden" rows="8"></textarea>
                            </li>
                        </ul>
                    </div>
                </div><!--box-->

            </div><!--main-content-->
</form>


            
<script>
function cancelDetail(){
   location.href = "http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe";
?>
"
}

function recipeDetail(){
   location.href = "http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-edit/" . cleanurl($recipeDetails['alias']);
?>
"
}
</script>

            
开发者ID:nickyudha,项目名称:spalosophy,代码行数:29,代码来源:index.php


示例14: foreach

echo "<input type=\"hidden\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\"";
if ($cat == 'top') {
    echo 'top';
} else {
    echo $cat_name;
}
echo "\" /> \n";
echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n";
echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . $total_page . "\" /> \n";
echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n";
echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n";
if (isset($_POST['btn-add-recipes'])) {
    if ($_POST['btn-add-recipes'] == "GO") {
        $option = $_POST['listing-option'];
        $action = $_POST['listing-action'];
        $array = $_POST['array_recipe_id'];
        if ($option == "delete" and $action == "yes") {
            foreach ($array as $recipe_id) {
                deleteMultiple($recipe_id);
                ?>
            <script>
			location.href = "http://<?php 
                echo $_SERVER['HTTP_HOST'], get_dirname($_SERVER['PHP_SELF']) . "/recipe";
                ?>
"
			</script>
            <?php 
            }
        }
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:control.php


示例15: header

                header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/filter-substrat");
            } else {
                header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/filter-substrat-detail/" . $_POST['cat_id'] . "/" . cleanurl($_POST['category_name']));
            }
        } else {
            if (isset($_POST['btn_sale_add'])) {
                header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/sale");
            } else {
                if (isset($_POST['btn_about_lang'])) {
                    header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-about");
                } else {
                    if (isset($_POST['btn_custom_news_lang'])) {
                        header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-news-edit/" . $_POST['news_id'] . "/" . cleanurl($_POST['ct_post_news_title']));
                    } else {
                        if (isset($_POST['btn_detail_news_category_lang'])) {
                            header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-news-category-detail/" . $_POST['hidden_category_id'] . "/" . cleanurl($_POST['hidden_category_name']));
                        } else {
                            if (isset($_POST['btn_lang_detail_category'])) {
                                header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-detail-category/" . $_POST['hidden_category_id'] . "/" . cleanurl($_POST['category_name']));
                            } else {
                                if (isset($_POST['btn_product_lang'])) {
                                    header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-product-details-" . $_POST['product_alias']);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:redirect.php


示例16: unzip

 /**
  * 文件解压
  *
  * @param unknown_type $path
  * @param unknown_type $name
  * @param unknown_type $info
  * @return unknown
  */
 public function unzip($path, $name, &$info = array())
 {
     $path = $this->get_gpath($path, 'u');
     $name = $this->get_gpath($name, 'x');
     if (false == stripos($name, '.zip') || !is_file($path)) {
         $this->error = '文件系统错误,压缩文件不存在';
         return false;
     } else {
         if (!is_writeable(get_dirname($path))) {
             $this->error = '文件系统错误,当前目录没有写入权限';
             return false;
         } else {
             if (!is_readable($path)) {
                 $this->error = '文件系统错误,目录文件没有访问权限';
                 return false;
             }
         }
     }
     $ifix = 0;
     $name = get_dirname($path) . '/' . substr(get_basename($name), 0, -4);
     $file = $name . '/';
     while (file_exists($file) && 6 > $ifix++) {
         if (5 < $ifix) {
             $ifix = time();
         }
         $file = "{$name}_X{$ifix}/";
     }
     $this->load('PclZip');
     $Zip = new PclZip($path);
     if (!$Zip->extract($file, false)) {
         $this->error = '文件系统错误,文件解压失败</br>Error : ' . $Zip->errorInfo(true);
         return false;
     }
     $info['dn'] = $info['fn'] = $info['si'] = $info['sc'] = 0;
     $list = $Zip->listContent() or array();
     foreach ($list as $val) {
         if ($val['folder']) {
             $info['dn'] += 1;
         } else {
             $info['sc'] += $val['compressed_size'];
             $info['si'] += $val['size'];
             $info['fn'] += 1;
         }
     }
     $info['name'] = $this->get_upath(get_basename($file), 'x');
     $info['si'] = get_deal_size($info['si']);
     $info['sc'] = get_deal_size($info['sc']);
     return true;
 }
开发者ID:nomagame,项目名称:ZiFeiYu-Management-System,代码行数:57,代码来源:FileFS.class.php


示例17: unset

<?php 
if ($_POST['btn_pop_category_lang'] == "") {
    unset($_SESSION['alert']);
    unset($_SESSION['msg']);
}
?>

        
<script>
$("#pop-category").hide();
$("#btn-delete").hide();

function resetSort(){
   location.href = "http://<?php 
echo $_SERVER['HTTP_HOST'], get_dirname($_SERVER['PHP_SELF']) . "/news-category";
?>
";
}
		
function addPop(){
   $("#pop-category").fadeIn("fast");
   $("#pop-title").text("Add Category");
   $("#news-category-active-status").attr('checked', 'checked');
   $("#news-category-visible-status").attr('checked','checked');
}

function closePop(){
   $("#pop-category").fadeOut("fast");
   $("#pop-title").val('');
   $("#btn-delete").hide();
开发者ID:nickyudha,项目名称:spalosophy,代码行数:30,代码来源:news_category.php


示例18: get_dirname

                            </li>
                            <li class="field">
                                <label>Date <span>*</span></label>
                                <p><?php 
echo $news_detail['news_created_date'];
?>
</p>
                                <input type="text" class="hidden input-text" style="width: 300px">
                            </li>
                            <li class="field input-file clearfix">
                                <label>Cover Image</label>
                                <div class="clearfix" style="width: 550px; padding-bottom: 8px">
                                    <div class="fl image" style="width: 174px; height: 116px">
                                        <div class="hidden"><div class="image-delete"></div><div class="image-overlay"></div></div>
                                        <img class="" src="http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/../" . $news_detail['news_image'];
?>
">
                                    </div>
                                </div>
                                <p class="field-message hidden" style="padding-top: 10px">Recommended dimensions of 228 x 152 px.</p>
                            </li>
                            <li class="field-divider"></li>
                            <li class="field">
                                <label>Content <span>*</span></label>
                                <p><?php 
echo preg_replace("/\n/", "\n<br>", $news_detail['news_content']);
?>
</p>
                                <textarea class="hidden" rows="8"></textarea>
                            </li>
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:index.php


示例19: get_dirname

            } else {
                if (move_uploaded_file($userfile_tmp, $prod_img) && $file_error == 0) {
                }
            }
        }
    }
    return $filename;
}
/*
# ----------------------------------------------------------------------
# DEFINED VARIABLE
# ----------------------------------------------------------------------
*/
$temp_url = 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/';
$temp_curr = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$temp_img = 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/admin/static/thimthumb.php?src=../';
/* --- ALERT SESSION --- */
if (!isset($_SESSION['alert']['type']) && !isset($_SESSION['alert']['msg'])) {
    $_SESSION['alert']['type'] = '';
    $_SESSION['alert']['msg'] = '';
}
if ($_SESSION['alert']['type'] != '' && $_SESSION['alert']['msg'] != '') {
    $_SESSION['alert']['type'] = $_SESSION['alert']['type'];
    $_SESSION['alert']['msg'] = $_SESSION['alert']['msg'];
} else {
    $_SESSION['alert']['type'] = $_SESSION['alert']['type'];
    $_SESSION['alert']['msg'] = $_SESSION['alert']['msg'];
}
/*
# ----------------------------------------------------------------------
# GET COUNTRY
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:_general.php


示例20: clearImage

	  
   $("#recipes-"+i).mouseleave(function(){
      $("#remove-recipes-"+i).fadeOut("fast");
   });
}

function clearImage(i){
   $("#upload-recipes-"+i).attr('src', '');
   $("#upload-recipes-"+i).addClass("hidden");
   $('#custom-recipe').html('<input type="file" name="upload_news_1" id="news-1" onchange="readURL(this,1)" class="hidden"/>');
   $("#recipes-flag").val('');
}

function cancelEdit(){
   location.href = "http://<?php 
echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_REQUEST['lang'] . "-recipe-detail/" . $recipe_alias;
?>
";
}

function checkDefault(i){
   var def_val = $('#id_normalization_'+i).val();
   
   if($('#id_custom_lang_default_'+i).is(':checked')){
	  $('#value_'+i).val('default');
   }else{
	  $('#value_'+i).val(def_val);
   }
							   
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:29,代码来源:recipes_edit.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_dirsize函数代码示例发布时间:2022-05-15
下一篇:
PHP get_directory_size函数代码示例发布时间: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