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


PHP get_site_root_url函数代码示例

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


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

示例1: foreach

     foreach ($region as $region_data) {
         $region_array[$region_data['region_id']] = $region_data['region_name'];
     }
 }
 $smarty->assign('shop_name', $_CFG['shop_name']);
 $smarty->assign('order_id', $order_id);
 $smarty->assign('province', $region_array[$_CFG['shop_province']]);
 $smarty->assign('city', $region_array[$_CFG['shop_city']]);
 $smarty->assign('shop_address', $_CFG['shop_address']);
 $smarty->assign('service_phone', $_CFG['service_phone']);
 $shipping = $db->getRow("SELECT * FROM " . $ecs->table("shipping") . " WHERE shipping_id = " . $order['shipping_id']);
 //打印单模式
 if ($shipping['print_model'] == 2) {
     /* 可视化 */
     /* 快递单 */
     $shipping['print_bg'] = empty($shipping['print_bg']) ? '' : get_site_root_url() . $shipping['print_bg'];
     /* 取快递单背景宽高 */
     if (!empty($shipping['print_bg'])) {
         $_size = @getimagesize($shipping['print_bg']);
         if ($_size != false) {
             $shipping['print_bg_size'] = array('width' => $_size[0], 'height' => $_size[1]);
         }
     }
     if (empty($shipping['print_bg_size'])) {
         $shipping['print_bg_size'] = array('width' => '1024', 'height' => '600');
     }
     /* 标签信息 */
     $lable_box = array();
     $lable_box['t_shop_country'] = $region_array[$_CFG['shop_country']];
     //网店-国家
     $lable_box['t_shop_city'] = $region_array[$_CFG['shop_city']];
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:order.php

示例2: date

        $name = date('Ymd');
        for ($i = 0; $i < 6; ++$i) {
            $name .= chr(mt_rand(97, 122));
        }
        $name .= '.' . end(explode('.', $_FILES['bg']['name']));
        $target = ROOT_PATH . '/images/receipt/' . $name;
        if (move_upload_file($_FILES['bg']['tmp_name'], $target)) {
            $src = '/images/receipt/' . $name;
        }
    }
    //保存
    $sql = 'UPDATE ' . $ecs->table('shipping') . " SET print_bg = '{$src}' WHERE shipping_id = '{$shipping_id}'";
    $res = $db->query($sql);
    if ($res) {
        echo '<script language="javascript">';
        echo 'parent.call_flash("bg_add", "' . get_site_root_url() . $src . '");';
        echo '</script>';
    }
} elseif ($_REQUEST['act'] == 'print_del') {
    /* 检查权限 */
    check_authz_json('ship_manage');
    $shipping_id = !empty($_GET['shipping']) ? intval($_GET['shipping']) : 0;
    $shipping_id = json_str_iconv($shipping_id);
    /* 检查该插件是否已经安装 取值 */
    $sql = 'SELECT print_bg FROM ' . $ecs->table('shipping') . " WHERE shipping_id = '{$shipping_id}' LIMIT 0,1";
    $row = $db->GetRow($sql);
    if ($row) {
        if ($row['print_bg'] != '' && !is_print_bg_default($row['print_bg'])) {
            @unlink(ROOT_PATH . $row['print_bg']);
        }
        $sql = 'UPDATE ' . $ecs->table('shipping') . " SET print_bg = '' WHERE shipping_id = '{$shipping_id}'";
开发者ID:netroby,项目名称:ecshop,代码行数:31,代码来源:shipping.php


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