백엔드 개발 PHP 튜토리얼 uploadinstallincludesauto_init.php源码分析

uploadinstallincludesauto_init.php源码分析

Jun 23, 2016 pm 01:42 PM

  1 <?php  2   3 /**  4  * ECSHOP 首页文件  5  * ============================================================================  6  * * 版权所有 2005-2012 上海商派网络科技有限公司,并保留所有权利。  7  * 网站地址: http://www.ecshop.com;  8  * ----------------------------------------------------------------------------  9  * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和 10  * 使用;不允许对程序代码以任何形式任何目的的再发布。 11  * ============================================================================ 12  * $Author: liubo $ 13  * $Id: index.php 17217 2011-01-19 06:29:08Z liubo $ 14 */ 15  16 define('IN_ECS', true); 17  18 require(dirname(__FILE__) . '/includes/init.php'); 19  20 if ((DEBUG_MODE & 2) != 2) 21 { 22     $smarty->caching = true; 23 } 24 $ua = strtolower($_SERVER['HTTP_USER_AGENT']); 25  26 $uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i"; 27  28 if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap')) 29 { 30     $Loaction = 'mobile/'; 31  32     if (!empty($Loaction)) 33     { 34         ecs_header("Location: $Loaction\n"); 35  36         exit; 37     } 38  39 } 40 /*------------------------------------------------------ */ 41 //-- Shopex系统地址转换 42 /*------------------------------------------------------ */ 43 if (!empty($_GET['gOo'])) 44 { 45     if (!empty($_GET['gcat'])) 46     { 47         /* 商品分类。*/ 48         $Loaction = 'category.php?id=' . $_GET['gcat']; 49     } 50     elseif (!empty($_GET['acat'])) 51     { 52         /* 文章分类。*/ 53         $Loaction = 'article_cat.php?id=' . $_GET['acat']; 54     } 55     elseif (!empty($_GET['goodsid'])) 56     { 57         /* 商品详情。*/ 58         $Loaction = 'goods.php?id=' . $_GET['goodsid']; 59     } 60     elseif (!empty($_GET['articleid'])) 61     { 62         /* 文章详情。*/ 63         $Loaction = 'article.php?id=' . $_GET['articleid']; 64     } 65  66     if (!empty($Loaction)) 67     { 68         ecs_header("Location: $Loaction\n"); 69  70         exit; 71     } 72 } 73  74 //判断是否有ajax请求 75 $act = !empty($_GET['act']) ? $_GET['act'] : ''; 76 if ($act == 'cat_rec') 77 { 78     $rec_array = array(1 => 'best', 2 => 'new', 3 => 'hot'); 79     $rec_type = !empty($_REQUEST['rec_type']) ? intval($_REQUEST['rec_type']) : '1'; 80     $cat_id = !empty($_REQUEST['cid']) ? intval($_REQUEST['cid']) : '0'; 81     include_once('includes/cls_json.php'); 82     $json = new JSON; 83     $result   = array('error' => 0, 'content' => '', 'type' => $rec_type, 'cat_id' => $cat_id); 84  85     $children = get_children($cat_id); 86     $smarty->assign($rec_array[$rec_type] . '_goods',      get_category_recommend_goods($rec_array[$rec_type], $children));    // 推荐商品 87     $smarty->assign('cat_rec_sign', 1); 88     $result['content'] = $smarty->fetch('library/recommend_' . $rec_array[$rec_type] . '.lbi'); 89     die($json->encode($result)); 90 } 91  92 /*------------------------------------------------------ */ 93 //-- 判断是否存在缓存,如果存在则调用缓存,反之读取相应内容 94 /*------------------------------------------------------ */ 95 /* 缓存编号 */ 96 $cache_id = sprintf('%X', crc32($_SESSION['user_rank'] . '-' . $_CFG['lang'])); 97  98 if (!$smarty->is_cached('index.dwt', $cache_id)) 99 {100     assign_template();101 102     $position = assign_ur_here();103     $smarty->assign('page_title',      $position['title']);    // 页面标题104     $smarty->assign('ur_here',         $position['ur_here']);  // 当前位置105 106     /* meta information */107     $smarty->assign('keywords',        htmlspecialchars($_CFG['shop_keywords']));108     $smarty->assign('description',     htmlspecialchars($_CFG['shop_desc']));109     $smarty->assign('flash_theme',     $_CFG['flash_theme']);  // Flash轮播图片模板110 111     $smarty->assign('feed_url',        ($_CFG['rewrite'] == 1) ? 'feed.xml' : 'feed.php'); // RSS URL112 113     $smarty->assign('categories',      get_categories_tree()); // 分类树114     $smarty->assign('helps',           get_shop_help());       // 网店帮助115     $smarty->assign('top_goods',       get_top10());           // 销售排行116 117     $smarty->assign('best_goods',      get_recommend_goods('best'));    // 推荐商品118     $smarty->assign('new_goods',       get_recommend_goods('new'));     // 最新商品119     $smarty->assign('hot_goods',       get_recommend_goods('hot'));     // 热点文章120     $smarty->assign('promotion_goods', get_promote_goods()); // 特价商品121     $smarty->assign('brand_list',      get_brands());122     $smarty->assign('promotion_info',  get_promotion_info()); // 增加一个动态显示所有促销信息的标签栏123 124     $smarty->assign('invoice_list',    index_get_invoice_query());  // 发货查询125     $smarty->assign('new_articles',    index_get_new_articles());   // 最新文章126     $smarty->assign('group_buy_goods', index_get_group_buy());      // 团购商品127     $smarty->assign('auction_list',    index_get_auction());        // 拍卖活动128     $smarty->assign('shop_notice',     $_CFG['shop_notice']);       // 商店公告129 130     /* 首页主广告设置 */131     $smarty->assign('index_ad',     $_CFG['index_ad']);132     if ($_CFG['index_ad'] == 'cus')133     {134         $sql = 'SELECT ad_type, content, url FROM ' . $ecs->table("ad_custom") . ' WHERE ad_status = 1';135         $ad = $db->getRow($sql, true);136         $smarty->assign('ad', $ad);137     }138 139     /* links */140     $links = index_get_links();141     $smarty->assign('img_links',       $links['img']);142     $smarty->assign('txt_links',       $links['txt']);143     $smarty->assign('data_dir',        DATA_DIR);       // 数据目录144 145     /* 首页推荐分类 */146     $cat_recommend_res = $db->getAll("SELECT c.cat_id, c.cat_name, cr.recommend_type FROM " . $ecs->table("cat_recommend") . " AS cr INNER JOIN " . $ecs->table("category") . " AS c ON cr.cat_id=c.cat_id");147     if (!empty($cat_recommend_res))148     {149         $cat_rec_array = array();150         foreach($cat_recommend_res as $cat_recommend_data)151         {152             $cat_rec[$cat_recommend_data['recommend_type']][] = array('cat_id' => $cat_recommend_data['cat_id'], 'cat_name' => $cat_recommend_data['cat_name']);153         }154         $smarty->assign('cat_rec', $cat_rec);155     }156 157     /* 页面中的动态内容 */158     assign_dynamic('index');159 }160 161 $smarty->display('index.dwt', $cache_id);162 163 /*------------------------------------------------------ */164 //-- PRIVATE FUNCTIONS165 /*------------------------------------------------------ */166 167 /**168  * 调用发货单查询169  *170  * @access  private171  * @return  array172  */173 function index_get_invoice_query()174 {175     $sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .176             ' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .177             " WHERE invoice_no > '' AND shipping_status = " . SS_SHIPPED .178             ' ORDER BY shipping_time DESC LIMIT 10';179     $all = $GLOBALS['db']->getAll($sql);180 181     foreach ($all AS $key => $row)182     {183         $plugin = ROOT_PATH . 'includes/modules/shipping/' . $row['shipping_code'] . '.php';184 185         if (file_exists($plugin))186         {187             include_once($plugin);188 189             $shipping = new $row['shipping_code'];190             $all[$key]['invoice_no'] = $shipping->query((string)$row['invoice_no']);191         }192     }193 194     clearstatcache();195 196     return $all;197 }198 199 /**200  * 获得最新的文章列表。201  *202  * @access  private203  * @return  array204  */205 function index_get_new_articles()206 {207     $sql = 'SELECT a.article_id, a.title, ac.cat_name, a.add_time, a.file_url, a.open_type, ac.cat_id, ac.cat_name ' .208             ' FROM ' . $GLOBALS['ecs']->table('article') . ' AS a, ' .209                 $GLOBALS['ecs']->table('article_cat') . ' AS ac' .210             ' WHERE a.is_open = 1 AND a.cat_id = ac.cat_id AND ac.cat_type = 1' .211             ' ORDER BY a.article_type DESC, a.add_time DESC LIMIT ' . $GLOBALS['_CFG']['article_number'];212     $res = $GLOBALS['db']->getAll($sql);213 214     $arr = array();215     foreach ($res AS $idx => $row)216     {217         $arr[$idx]['id']          = $row['article_id'];218         $arr[$idx]['title']       = $row['title'];219         $arr[$idx]['short_title'] = $GLOBALS['_CFG']['article_title_length'] > 0 ?220                                         sub_str($row['title'], $GLOBALS['_CFG']['article_title_length']) : $row['title'];221         $arr[$idx]['cat_name']    = $row['cat_name'];222         $arr[$idx]['add_time']    = local_date($GLOBALS['_CFG']['date_format'], $row['add_time']);223         $arr[$idx]['url']         = $row['open_type'] != 1 ?224                                         build_uri('article', array('aid' => $row['article_id']), $row['title']) : trim($row['file_url']);225         $arr[$idx]['cat_url']     = build_uri('article_cat', array('acid' => $row['cat_id']), $row['cat_name']);226     }227 228     return $arr;229 }230 231 /**232  * 获得最新的团购活动233  *234  * @access  private235  * @return  array236  */237 function index_get_group_buy()238 {239     $time = gmtime();240     $limit = get_library_number('group_buy', 'index');241 242     $group_buy_list = array();243     if ($limit > 0)244     {245         $sql = 'SELECT gb.act_id AS group_buy_id, gb.goods_id, gb.ext_info, gb.goods_name, g.goods_thumb, g.goods_img ' .246                 'FROM ' . $GLOBALS['ecs']->table('goods_activity') . ' AS gb, ' .247                     $GLOBALS['ecs']->table('goods') . ' AS g ' .248                 "WHERE gb.act_type = '" . GAT_GROUP_BUY . "' " .249                 "AND g.goods_id = gb.goods_id " .250                 "AND gb.start_time <= '" . $time . "' " .251                 "AND gb.end_time >= '" . $time . "' " .252                 "AND g.is_delete = 0 " .253                 "ORDER BY gb.act_id DESC " .254                 "LIMIT $limit" ;255         $res = $GLOBALS['db']->query($sql);256 257         while ($row = $GLOBALS['db']->fetchRow($res))258         {259             /* 如果缩略图为空,使用默认图片 */260             $row['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);261             $row['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);262 263             /* 根据价格阶梯,计算最低价 */264             $ext_info = unserialize($row['ext_info']);265             $price_ladder = $ext_info['price_ladder'];266             if (!is_array($price_ladder) || empty($price_ladder))267             {268                 $row['last_price'] = price_format(0);269             }270             else271             {272                 foreach ($price_ladder AS $amount_price)273                 {274                     $price_ladder[$amount_price['amount']] = $amount_price['price'];275                 }276             }277             ksort($price_ladder);278             $row['last_price'] = price_format(end($price_ladder));279             $row['url'] = build_uri('group_buy', array('gbid' => $row['group_buy_id']));280             $row['short_name']   = $GLOBALS['_CFG']['goods_name_length'] > 0 ?281                                            sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];282             $row['short_style_name']   = add_style($row['short_name'],'');283             $group_buy_list[] = $row;284         }285     }286 287     return $group_buy_list;288 }289 290 /**291  * 取得拍卖活动列表292  * @return  array293  */294 function index_get_auction()295 {296     $now = gmtime();297     $limit = get_library_number('auction', 'index');298     $sql = "SELECT a.act_id, a.goods_id, a.goods_name, a.ext_info, g.goods_thumb ".299             "FROM " . $GLOBALS['ecs']->table('goods_activity') . " AS a," .300                       $GLOBALS['ecs']->table('goods') . " AS g" .301             " WHERE a.goods_id = g.goods_id" .302             " AND a.act_type = '" . GAT_AUCTION . "'" .303             " AND a.is_finished = 0" .304             " AND a.start_time <= '$now'" .305             " AND a.end_time >= '$now'" .306             " AND g.is_delete = 0" .307             " ORDER BY a.start_time DESC" .308             " LIMIT $limit";309     $res = $GLOBALS['db']->query($sql);310 311     $list = array();312     while ($row = $GLOBALS['db']->fetchRow($res))313     {314         $ext_info = unserialize($row['ext_info']);315         $arr = array_merge($row, $ext_info);316         $arr['formated_start_price'] = price_format($arr['start_price']);317         $arr['formated_end_price'] = price_format($arr['end_price']);318         $arr['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);319         $arr['url'] = build_uri('auction', array('auid' => $arr['act_id']));320         $arr['short_name']   = $GLOBALS['_CFG']['goods_name_length'] > 0 ?321                                            sub_str($arr['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $arr['goods_name'];322         $arr['short_style_name']   = add_style($arr['short_name'],'');323         $list[] = $arr;324     }325 326     return $list;327 }328 329 /**330  * 获得所有的友情链接331  *332  * @access  private333  * @return  array334  */335 function index_get_links()336 {337     $sql = 'SELECT link_logo, link_name, link_url FROM ' . $GLOBALS['ecs']->table('friend_link') . ' ORDER BY show_order';338     $res = $GLOBALS['db']->getAll($sql);339 340     $links['img'] = $links['txt'] = array();341 342     foreach ($res AS $row)343     {344         if (!empty($row['link_logo']))345         {346             $links['img'][] = array('name' => $row['link_name'],347                                     'url'  => $row['link_url'],348                                     'logo' => $row['link_logo']);349         }350         else351         {352             $links['txt'][] = array('name' => $row['link_name'],353                                     'url'  => $row['link_url']);354         }355     }356 357     return $links;358 }359 360 ?>
로그인 후 복사

调用结构层级

  • \upload\index.php
  • \upload\includes\init.php
  • \upload\install\index.php
  • \upload\install\auto_index.php
  • \upload\install\includes\auto_init.php
  • @ini_set('display_errors', 1);  //设置显示错误

    error_reporting(E_ALL ^ E_NOTICE);  //报告所有的错误、通知,其中通知是脚本发现的可能是错误的地方

     

    clearstatcache();  //清除缓存

     

    define('ROOT_PATH', str_replace('install/includes/auto_init.php', '', str_replace('\\', '/', __FILE__)));  //定义常量'ROOT_PATH'为网站根目录upload/

     if (isset($_SERVER['PHP_SELF']))  //定义常量'PHP_SELF'为,$_SERVER['PHP_SELF'](当前执行脚本的文件名)或$_SERVER['SCRIPT_NAME'](当前执行脚本所在文件夹的路径)

    {

        define('PHP_SELF', $_SERVER['PHP_SELF']);

    }

    else

    {

        define('PHP_SELF', $_SERVER['SCRIPT_NAME']);

    }  

     

    define('EC_CHARSET','utf-8');  //定义常量'EC_CHARSET'和'EC_DB_CHARSET'为UTF8

    define('EC_DB_CHARSET','utf8');

     

    require(ROOT_PATH . 'includes/lib_base.php');  //引用基础函数库,公用函数库,时间函数库,方便之后调用其中的函数

    require(ROOT_PATH . 'includes/lib_common.php');

    require(ROOT_PATH . 'includes/lib_time.php');

     

    require(ROOT_PATH . 'includes/cls_error.php');  //生成一个错误类对象,模板为message.dwt,此处并未导入dwt文件,只是给类成员对象$_template赋值

    $err = new ecs_error('message.dwt');

     

    require(ROOT_PATH . 'install/includes/cls_template.php');  //生成一个模板类对象,并给类成员对象路径$path赋值

    $smarty = new template(ROOT_PATH . 'install/templates/');

     

    require(ROOT_PATH . 'install/includes/lib_auto_installer.php');  //调用lib_auto_installer.php实际上什么也没做,lib_auto_installer.php提供了一系列库函数以供调用

     

    header('Content-type: text/html; charset='.EC_CHARSET);  //告诉浏览器文本类型,编码格式,其中EC_CHARSET在前面定义过,值为'utf-8'。

    @set_time_limit(360);  //设定脚本的最长执行时间为360秒,如果超过了时间限制,程序结束

    总结一下:

    这个php为自动安装程序做了初始化工作,包括生成一个错误类ecs_error对象(执行构造函数将公有成员变量$_template值设为‘message.dwt’),生成一个模板类template对象(执行构造函数将公有成员变量$path值设为'/upload/install/templates/';告诉浏览器文本类型为text/html,编码格式utf8;设定脚本最长执行时间为360秒。

    对于最后一条语句@set_time_limit(360)我有一些疑问想和大家分享一下。

    set_time_limit函数实际上和修改php.ini中的max_execution_time可以起到一样的效果。这里说设定脚本最长执行时间为360秒,最初看到这条语句我陷入了一个误区:由于从顶层的index.php到这个php是一路require过来,并且在执行时require语句会被它所包含的文件直接替换,那么这个360秒到底是限制哪一个php的的执行时间。就在我百思不得其解时,看到了脚本这个词,然后忽然想到这个函数不是用来限制php文件的执行时间,php文件也不是脚本文件,这个函数是用来限制ecshop中用到的js之类脚本的执行时间,原谅我没文化,在此罗嗦了一大堆。

    본 웹사이트의 성명
    본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

    핫 AI 도구

    Undresser.AI Undress

    Undresser.AI Undress

    사실적인 누드 사진을 만들기 위한 AI 기반 앱

    AI Clothes Remover

    AI Clothes Remover

    사진에서 옷을 제거하는 온라인 AI 도구입니다.

    Undress AI Tool

    Undress AI Tool

    무료로 이미지를 벗다

    Clothoff.io

    Clothoff.io

    AI 옷 제거제

    Video Face Swap

    Video Face Swap

    완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

    뜨거운 도구

    메모장++7.3.1

    메모장++7.3.1

    사용하기 쉬운 무료 코드 편집기

    SublimeText3 중국어 버전

    SublimeText3 중국어 버전

    중국어 버전, 사용하기 매우 쉽습니다.

    스튜디오 13.0.1 보내기

    스튜디오 13.0.1 보내기

    강력한 PHP 통합 개발 환경

    드림위버 CS6

    드림위버 CS6

    시각적 웹 개발 도구

    SublimeText3 Mac 버전

    SublimeText3 Mac 버전

    신 수준의 코드 편집 소프트웨어(SublimeText3)

    JWT (JSON Web Tokens) 및 PHP API의 사용 사례를 설명하십시오. JWT (JSON Web Tokens) 및 PHP API의 사용 사례를 설명하십시오. Apr 05, 2025 am 12:04 AM

    JWT는 주로 신분증 인증 및 정보 교환을 위해 당사자간에 정보를 안전하게 전송하는 데 사용되는 JSON을 기반으로 한 개방형 표준입니다. 1. JWT는 헤더, 페이로드 및 서명의 세 부분으로 구성됩니다. 2. JWT의 작업 원칙에는 세 가지 단계가 포함됩니다. JWT 생성, JWT 확인 및 Parsing Payload. 3. PHP에서 인증에 JWT를 사용하면 JWT를 생성하고 확인할 수 있으며 사용자 역할 및 권한 정보가 고급 사용에 포함될 수 있습니다. 4. 일반적인 오류에는 서명 검증 실패, 토큰 만료 및 대형 페이로드가 포함됩니다. 디버깅 기술에는 디버깅 도구 및 로깅 사용이 포함됩니다. 5. 성능 최적화 및 모범 사례에는 적절한 시그니처 알고리즘 사용, 타당성 기간 설정 합리적,

    세션 납치는 어떻게 작동하며 PHP에서 어떻게 완화 할 수 있습니까? 세션 납치는 어떻게 작동하며 PHP에서 어떻게 완화 할 수 있습니까? Apr 06, 2025 am 12:02 AM

    세션 납치는 다음 단계를 통해 달성 할 수 있습니다. 1. 세션 ID를 얻으십시오. 2. 세션 ID 사용, 3. 세션을 활성 상태로 유지하십시오. PHP에서 세션 납치를 방지하는 방법에는 다음이 포함됩니다. 1. 세션 _regenerate_id () 함수를 사용하여 세션 ID를 재생산합니다. 2. 데이터베이스를 통해 세션 데이터를 저장하십시오.

    PHP 8.1에서 열거 (열거)는 무엇입니까? PHP 8.1에서 열거 (열거)는 무엇입니까? Apr 03, 2025 am 12:05 AM

    PHP8.1의 열거 기능은 명명 된 상수를 정의하여 코드의 명확성과 유형 안전성을 향상시킵니다. 1) 열거는 정수, 문자열 또는 객체 일 수 있으며 코드 가독성 및 유형 안전성을 향상시킬 수 있습니다. 2) 열거는 클래스를 기반으로하며 Traversal 및 Reflection과 같은 객체 지향적 특징을 지원합니다. 3) 열거는 유형 안전을 보장하기 위해 비교 및 ​​할당에 사용될 수 있습니다. 4) 열거는 복잡한 논리를 구현하는 방법을 추가하는 것을 지원합니다. 5) 엄격한 유형 확인 및 오류 처리는 일반적인 오류를 피할 수 있습니다. 6) 열거는 마법의 가치를 줄이고 유지 관리를 향상 시키지만 성능 최적화에주의를 기울입니다.

    확실한 원칙과 PHP 개발에 적용되는 방법을 설명하십시오. 확실한 원칙과 PHP 개발에 적용되는 방법을 설명하십시오. Apr 03, 2025 am 12:04 AM

    PHP 개발에서 견고한 원칙의 적용에는 다음이 포함됩니다. 1. 단일 책임 원칙 (SRP) : 각 클래스는 하나의 기능 만 담당합니다. 2. Open and Close Principle (OCP) : 변경은 수정보다는 확장을 통해 달성됩니다. 3. Lisch의 대체 원칙 (LSP) : 서브 클래스는 프로그램 정확도에 영향을 미치지 않고 기본 클래스를 대체 할 수 있습니다. 4. 인터페이스 격리 원리 (ISP) : 의존성 및 사용되지 않은 방법을 피하기 위해 세밀한 인터페이스를 사용하십시오. 5. 의존성 반전 원리 (DIP) : 높고 낮은 수준의 모듈은 추상화에 의존하며 종속성 주입을 통해 구현됩니다.

    phpstorm에서 CLI 모드를 디버그하는 방법은 무엇입니까? phpstorm에서 CLI 모드를 디버그하는 방법은 무엇입니까? Apr 01, 2025 pm 02:57 PM

    phpstorm에서 CLI 모드를 디버그하는 방법은 무엇입니까? PHPStorm으로 개발할 때 때때로 CLI (Command Line Interface) 모드에서 PHP를 디버그해야합니다 ...

    시스템 재시작 후 UnixSocket의 권한을 자동으로 설정하는 방법은 무엇입니까? 시스템 재시작 후 UnixSocket의 권한을 자동으로 설정하는 방법은 무엇입니까? Mar 31, 2025 pm 11:54 PM

    시스템이 다시 시작된 후 UnixSocket의 권한을 자동으로 설정하는 방법. 시스템이 다시 시작될 때마다 UnixSocket의 권한을 수정하려면 다음 명령을 실행해야합니다.

    PHP의 CURL 라이브러리를 사용하여 JSON 데이터가 포함 된 게시물 요청을 보내는 방법은 무엇입니까? PHP의 CURL 라이브러리를 사용하여 JSON 데이터가 포함 된 게시물 요청을 보내는 방법은 무엇입니까? Apr 01, 2025 pm 03:12 PM

    PHP 개발에서 PHP의 CURL 라이브러리를 사용하여 JSON 데이터를 보내면 종종 외부 API와 상호 작용해야합니다. 일반적인 방법 중 하나는 컬 라이브러리를 사용하여 게시물을 보내는 것입니다 ...

    See all articles