백엔드 개발 PHP 튜토리얼 PHP Alipay 개발 서비스 창 API

PHP Alipay 개발 서비스 창 API

Dec 29, 2017 pm 06:15 PM
api php

이 글은 주로 Alipay 서비스 창 API 인터페이스의 PHP 버전 개발을 소개합니다. 관심 있는 친구들은 이를 참고할 수 있습니다. 그것이 모두에게 도움이 되기를 바랍니다.

Alipay 서비스 창 API 인터페이스의 개발은 웹사이트에서 재충전을 원하는 많은 친구들에게 매우 중요합니다. 오늘은 Alipay 서비스 창 API 인터페이스의 PHP 버전 개발 예를 살펴보겠습니다.

지난 이틀 동안 알리페이 서비스 창구에 접속해 알리페이 DEMO를 보려고 할 일이 없었습니다. 맙소사, 어떻게 평가할 수 있을까요? 가독성이 별로 좋지 않고 단순한 개발에도 방해가 됩니다. 그래서 그냥 제공된 API를 기반으로 개발했는데 인터페이스에는 아직 부족한 부분이 많네요. 관심 있으신 분들은 직접 개선해보시면 좋을 것 같습니다. 시간이 나면 활용법도 적어보겠습니다.

<?php 
class AlipayService{ 
 /** 
 - 服务接口信息 
 */ 
 public $service = null; 
 /** 
 - 签名信息 
 */ 
 public $sign = null; 
 /** 
 - 签名类型 
 */ 
 public $sign_type = null; 
 /** 
 - 字符集 
 */ 
 public $charset = null; 
 /** 
 - 解析的biz_content数据 
 */ 
 public $request = null; 
 /** 
 - 用户openid 
 */ 
 public $from_user_id = null; 
 /** 
 - 消息类型 
 */ 
 public $msg_type = null; 
 /** 
 - 事件类型 
 */ 
 public $event_type = null; 
 /** 
 - 行为参数 
 */ 
 public $action_param = null; 
 /** 
 - 支付宝用户信息 
 */ 
 public $user_info = null; 
 /** 
 - 文本消息内容 
 */ 
 public $text = null; 
 /** 
 - 图片媒体id 
 */ 
 public $media_id = null; 
 /** 
 - 图片格式 
 */ 
 public $format = null; 
 /** 
 - 是否开启调试 
 */ 
 private $debug = false; 
 /** 
 - 接口类型 
 */ 
 private $interface_type = array( 
  &#39;qrcode&#39; => &#39;alipay.mobile.public.qrcode.create&#39;, 
  &#39;follow&#39; => &#39;alipay.mobile.public.follow.list&#39;, 
  &#39;gis_get&#39; => &#39;alipay.mobile.public.gis.get&#39;, 
  &#39;menu_get&#39; => &#39;alipay.mobile.public.menu.get&#39;,  
  &#39;menu_add&#39; => &#39;alipay.mobile.public.menu.add&#39;, 
  &#39;down_media&#39; => &#39;alipay.mobile.public.multimedia.download&#39;, 
  &#39;menu_update&#39; => &#39;alipay.mobile.public.menu.update&#39;, 
  &#39;info_query&#39; => &#39;alipay.mobile.public.info.query&#39;, 
  &#39;info_modify&#39; => &#39;alipay.mobile.public.info.modify&#39;, 
  &#39;shortlink&#39; => &#39;alipay.mobile.public.shortlink.create&#39;, 
  &#39;label_add&#39; => &#39;alipay.mobile.public.label.add&#39;, 
  &#39;label_del&#39; => &#39;alipay.mobile.public.label.delete&#39;, 
  &#39;label_update&#39; => &#39;alipay.mobile.public.label.update&#39;, 
  &#39;label_query&#39;  => &#39;alipay.mobile.public.label.query&#39;, 
  &#39;label_user_add&#39; => &#39;alipay.mobile.public.label.user.add&#39;, 
  &#39;label_user_del&#39; => &#39;alipay.mobile.public.label.user.delete&#39;, 
  &#39;label_user_query&#39; => &#39;alipay.mobile.public.label.user.query&#39;, 
  &#39;message_custom&#39; => &#39;alipay.mobile.public.message.custom.send&#39;, 
  &#39;message_total&#39; => &#39;alipay.mobile.public.message.total.send&#39;, 
  &#39;message_single&#39; => &#39;alipay.mobile.public.message.single.send&#39;, 
  &#39;message_label_send&#39; => &#39;alipay.mobile.public.message.label.send&#39;, 
 ); 
 /** 
 - 私有密钥地址,替换为你自己的 
 */ 
 private $private_rsa_key_path =&#39;rsa_private_key.pem&#39;; 
 /** 
 - 私有密钥地址,替换为你自己的 
 */ 
 private $public_rsa_key_path =&#39;rsa_public_key.pem&#39;; 
 /** 
 - 支付宝窗的app id 替换成你自己的 
 */ 
 private $app_id = &#39;2015120200901652&#39;; 
 /** 
 - 开启DEBUG参数 
 - @params bool debug true 开启调试 false 关闭调试 
 - @author widuu <admin@widuu.com> 
 */ 
 public function __construct( $debug = false ){ 
 /* 是否开启DEBUG */ 
 if( $debug ) $this->debug = true; 
 } 
 /** 
 - 获取参数,解析请求参数 
 - 
 - @author widuu <admin@widuu.com> 
 */ 
 public function get_request(){ 
 if( !emptyempty($_POST) ){ 
  // 请求的服务接口 
  $this->service = $_POST[&#39;service&#39;]; 
  // 获取请求字符集 
  $this->charset = $_POST[&#39;charset&#39;]; 
  // 获取请求的biz_content 
  $request_biz_content = $_POST[&#39;biz_content&#39;]; 
  // 加密算法 
  $this->sign_type = $_POST[&#39;sign_type&#39;]; 
  // 加密字符串 
  $this->sign = $_POST[&#39;sign&#39;]; 
  // 如果请求格式不是Utf-8 转换格式为Utf-8 
  if( strtolower($this->charset) != &#39;utf-8&#39; ){ 
  $request_biz_content = iconv(&#39;GBK&#39;, &#39;utf-8&#39;, $request_biz_content); 
  } 
  // 解析字符串为xml 
  $request_xml = @simplexml_load_string($request_biz_content, "SimpleXMLElement" , LIBXML_NOCDATA ); 
  // 解析为数组 
  $request_array = json_decode(json_encode($request_xml),true); 
  $this->request = $request_array; 
  /* 解析 */ 
  $this->analysis($request_array); 
  if($this->debug) $this->write_log(&#39;REQUEST_INFO&#39;,var_export($request_array,true)); 
  // 默认验证方法 
  if( $this->service == &#39;alipay.service.check&#39;){ 
  $this->verify($_POST); 
  exit(); 
  } 
  /* 返回结果 */ 
  return $request_array; 
 } 
 } 
 /** 
 - 回复文本内容 
 - @params string content 文本数据 
 - @params bool mass ture为群发 
 - @author widuu <admin@widuu.com> 
 */ 
 public function text($content,$mass=false){ 
 $info[&#39;text&#39;] = array( &#39;content&#39; => $content ); 
 /* 组织内容 */ 
 $biz_content = $this->common_response(&#39;text&#39;,$info,$mass); 
 /* 判断是否为群发 */ 
 if($mass){ 
  $method = &#39;message_total&#39;; 
 }else{ 
  $method = &#39;message_custom&#39;; 
 } 
 $sys_params = $this->common_system($method,$biz_content); 
 $sys_params[&#39;sign&#39;] = $this->rsa_sign($this->build_query($sys_params)); 
 /* 返回结果 结果是JSON数据 */ 
 $result = $this->response_post($sys_params); 
 return $result; 
 } 
 /** 
 - 回复图文内容 
 - @params array articles 拼接的图文消息数组 
 - @params bool mass ture为群发 
 - @author widuu <admin@widuu.com> 
 */ 
 public function articles($articles,$mass=false){ 
 $info[&#39;articles&#39;] = array($articles); 
 /* 组织内容 */ 
 $biz_content = $this->common_response(&#39;image-text&#39;,$info,$mass); 
 /* 判断是否群发 */ 
 if($mass){ 
  $method = &#39;message_total&#39;; 
 }else{ 
  $method = &#39;message_custom&#39;; 
 } 
 /* 加密参数 */ 
 $sys_params = $this->common_system($method,$biz_content); 
 /* 加密字符 */ 
 $sys_params[&#39;sign&#39;] = $this->rsa_sign($this->build_query($sys_params)); 
 /* 返回结果 结果是JSON数据 */ 
 $result = $this->response_post($sys_params); 
 return $result; 
 } 
 /** 
 - 关注事件 
 - 
 - @author widuu <admin@widuu.com> 
 */ 
 public function is_follow(){ 
 $request = $this->request; 
 if( $request[&#39;MsgType&#39;] == &#39;event&#39; && $request[&#39;EventType&#39;] == &#39;follow&#39; ){ 
  return true; 
 }else{ 
  return false; 
 } 
 } 
 /** 
 - 取消关注事件 
 - 
 - @author widuu <admin@widuu.com> 
 */ 
 public function is_unfollow(){ 
 $request = $this->request; 
 if( $request[&#39;MsgType&#39;] == &#39;event&#39; && $request[&#39;EventType&#39;] == &#39;unfollow&#39; ){ 
  return true; 
 }else{ 
  return false; 
 } 
 } 
 /** 
 - 下载用户发来的图片 
 - @param media_id string 图片id 
 - @param filename string 保存图片地址和名称 
 - @author widuu <admin@widuu.com> 
 */ 
 public function down_media($media_id,$filename){ 
 $sys_params = $this->common_system(&#39;down_media&#39;,array(&#39;mediaId&#39;=>$media_id)); 
 $sys_params[&#39;sign&#39;] = $this->rsa_sign($this->build_query($sys_params)); 
 /* 返回数据 */ 
 $result = $this->response_post($sys_params,true); 
 $result = file_put_contents($filename, $result); 
 if( $this->debug ){ 
  $this->write_log(&#39;SAVE_IMAGE&#39;,&#39;保存图片&#39;.(string)$result); 
 } 
 return $result; 
 } 
 /** 
 - (添加|更新|获取)自定义菜单 
 - @param string $type (add|update|get) 
 - @param array $menu 菜单数组,如果是获取菜单可以留空 
 - @author widuu <admin@widuu.com> 
 */ 
 public function menu( $type,$menu = array() ){ 
 if( !in_array( $type, array(&#39;get&#39;,&#39;update&#39;,&#39;add&#39;)) ){ 
  if( $this->debug ){ 
  $this->write_log(&#39;ERROR&#39;,&#39;菜单操作方法错误&#39;); 
  } 
  return false; 
 } 
 /* 拼接接口方法 */ 
 $method = &#39;menu_&#39;.$type; 
 $sys_params = $this->common_system($method,$menu); 
 /* 加密字符串 */ 
 $sys_params[&#39;sign&#39;] = $this->rsa_sign($this->build_query($sys_params)); 
 /* 请求获取结果 */ 
 $result = $this->response_post($sys_params); 
 /* 转义并解析JSON 数据 */ 
 $menu_json = json_decode(iconv(&#39;GBK&#39;, &#39;utf-8&#39;, $result),true); 
 /* 组织接口信息 */ 
 $interface = &#39;alipay_mobile_public_&#39;.$method.&#39;_response&#39;; 
 /* 遇到错误返回 */ 
 if( $menu_json[$interface][&#39;code&#39;] != 200 ){ 
  if( $this->debug ){ 
  $this->write_log(&#39;GET_MENU_ERROR&#39;,$menu_json[$interface][&#39;msg&#39;]); 
  } 
  return false; 
 } 
 /* 根据类型不同返回不同的结果 */ 
 if( $type == &#39;get&#39; ){ 
  return $menu_json[$interface][&#39;menu_content&#39;]; 
 }else{ 
  return $menu_json[$interface][&#39;msg&#39;]; 
 } 
 } 
 
 /** 
 - POST数据方法 
 - @param array params 参数数组 
 - @author widuu <admin@widuu.com> 
 */ 
 private function response_post($params,$type=false){ 
 // 下载媒体和请求网关 
 if($down){ 
  $url = &#39;https://openfile.alipay.com/chat/multimedia.do&#39;; 
 }else{ 
  $url = &#39;https://openapi.alipay.com/gateway.do&#39;; 
 } 
 $ch = curl_init(); 
 curl_setopt($ch, CURLOPT_URL, $url); 
 curl_setopt($ch, CURLOPT_HEADER, 0); 
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
 curl_setopt($ch, CURLOPT_POST, 1); 
 curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); 
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true); 
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 
 curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); 
 $curl = curl_exec($ch); 
 curl_close($ch); 
 return $curl; 
 } 
 /** 
 - 拼接回复数据 
 - @param string $type 回复类型 
 - @param array $info 回复内容 
 - @param bool $mass 是否为群发 
 - @author widuu <admin@widuu.com> 
 */ 
 private function common_response($type,$info,$mass=false){ 
 $request = $this->request; 
 $params = array(); 
 // 如果不是群发 
 if( !$mass ) $params[&#39;toUserId&#39;] = $request[&#39;FromUserId&#39;]; 
 $params[&#39;msgType&#39;] = $type; 
 $params[&#39;createTime&#39;] = time(); 
 $content = array_merge($params,$info); 
 return $content; 
 } 
 /** 
 - 拼接加密参数 
 - @param string $interface_type 接口类型 
 - @param array $biz_content 返回biz_content的数组 
 - @author widuu <admin@widuu.com> 
 */ 
 
 private function common_system($interface_type,$biz_content){ 
 /* 接口集合 */ 
 $type = $this->interface_type; 
 $method = $type[$interface_type]; 
 /* 公共参数 */ 
 $params = array ( 
  &#39;method&#39; => $method, 
  &#39;charset&#39; => &#39;UTF-8&#39;, 
  &#39;sign_type&#39; => &#39;RSA&#39;, 
  &#39;app_id&#39; => $this->app_id, 
  &#39;timestamp&#39; => date ( &#39;Y-m-d H:i:s&#39;, time () ), 
  &#39;version&#39;=>&#39;1.0&#39;, 
 ); 
 /* 获取某些接口时没有biz_content参数 */ 
 if( count($biz_content) > 0 ){ 
  $params[&#39;biz_content&#39;] = json_encode($biz_content); 
 } 
 /* 返回系统参数 */ 
 return $params; 
 } 
 /** 
 - 服务验证 
 - @params array params 是自动获的验证信息 
 - @author widuu <admin@widuu.com> 
 */ 
 private function verify($params){ 
 /* 参数为空 */ 
 if( emptyempty($params) ){ 
  if( $this->debug ){ 
  $this->write_log(&#39;ERROR&#39;,&#39;验证参数为空&#39;); 
  } 
 } 
 /* 构建参数,使用字典排序再拼接字符串 */ 
 $query_data = $this->build_query($params); 
 /* 验证信息,有可能php版本BUG不支持验证 */ 
 $verify_result = $this->ras_verify($query_data); 
 /* 返回验证结果 */ 
 if( $verify_result ){ 
  /* 取公有密钥的字符串合并为一行 */ 
  $public_rsa_string = file_get_contents($this->public_rsa_key_path); 
  $public_rsa_string = str_replace ( "-----BEGIN PUBLIC KEY-----", "", $public_rsa_string ); 
  $public_rsa_string = str_replace ( "-----END PUBLIC KEY-----", "", $public_rsa_string ); 
  $public_rsa_string = str_replace ( "\r", "", $public_rsa_string ); 
  $public_rsa_string = str_replace ( "\n", "", $public_rsa_string ); 
  /* 构建加密字符串 */ 
  $response_xml = "<success>true</success><biz_content>$public_rsa_string</biz_content>"; 
  /* 生成验证信息 */ 
  $sign = $this->rsa_sign ( $response_xml ); 
  /* 构建返回数据 */ 
  $response = "<?xml version=\"1.0\" encoding=\"GBK\"?><alipay><response>$response_xml</response><sign>$sign</sign><sign_type>RSA</sign_type></alipay>"; 
  if( $this->debug ){ 
  $this->write_log(&#39;CHECK_RESPONSE&#39;,$response); 
  } 
  /* 输出返回信息 */ 
  echo $response; 
  exit(); 
 }else{ 
  if( $this->debug ){ 
  $this->write_log(&#39;ERROR&#39;,&#39;验证失败&#39;); 
  } 
 } 
 } 
 /** 
 - 拼接为字符串函数 
 - @params array params 拼接函数 
 - @author widuu <admin@widuu.com> 
 */ 
 private function build_query($params){ 
 /* 删除sign字符串 */ 
 unset($params[&#39;sign&#39;]); 
 /* 字典排序 */ 
 ksort($params); 
 /* 拼接 */ 
 $query_array = array(); 
 foreach ($params as $k => $v) { 
  $query_array[] = "$k"."="."$v"; 
 } 
 $query_data = implode("&", $query_array); 
 /* 返回拼接好的字符串 */ 
 return $query_data; 
 } 
 /** 
 - 验证加密sign,有些PHP版本不支持,不支持情况直接返回true 
 - @params string query_data 加密字符串 
 - @author widuu <admin@widuu.com> 
 */ 
 private function ras_verify($query_data){ 
 /* 读取公钥文件,PEM格式 */ 
 $pubKey = file_get_contents($this->public_rsa_key_path); 
 /* 转换为openssl格式密钥 */ 
 $res = openssl_get_publickey($pubKey); 
 /* 调用openssl内置方法验签 */ 
 $result = (bool) openssl_verify($query_data, base64_decode($this->sign), $res); 
 /* 释放资源 */ 
 openssl_free_key($res); 
 /* 有些PHP版本错误,直接返回true */ 
 if( strpos( openssl_error_string(),&#39;PEM_read_bio&#39; ) ){ 
  return true; 
 } 
 /* 返回验签结果 */ 
 return $result; 
 } 
 /** 
 - 通过私有密钥加密数据 
 - @params string data 加密数据 
 - @author widuu <admin@widuu.com> 
 */ 
 private function rsa_sign($data) { 
 /* 读取私钥 */ 
 $priKey = file_get_contents ( $this->private_rsa_key_path ); 
 /* 转换为openssl格式密钥 */ 
 $res = openssl_get_privatekey ( $priKey ); 
 /* 调用openssl 加密 */ 
 openssl_sign ( $data, $sign, $res ); 
 /* 释放资源 */ 
 openssl_free_key ( $res ); 
 /* Base64加密 */ 
 $sign = base64_encode ( $sign ); 
 /* 返回加密参数 */ 
 return $sign; 
 } 
 private function analysis($params){ 
 switch($params[&#39;MsgType&#39;]){ 
  case &#39;image&#39;: 
  $this->media_id = $params[&#39;Image&#39;][&#39;MediaId&#39;]; 
  $this->format = $params[&#39;Image&#39;][&#39;Format&#39;]; 
  break; 
  case &#39;text&#39;: 
  $this->text = $params[&#39;Text&#39;][&#39;Content&#39;]; 
  break; 
  case &#39;event&#39;: 
  $this->event_type = $params[&#39;EventType&#39;]; 
  $this->action_param = $params[&#39;ActionParam&#39;]; 
  break; 
  default: 
  break; 
 } 
 $this->msg_type = $params[&#39;MsgType&#39;]; 
 $this->user_info = json_decode($params[&#39;UserInfo&#39;],true); 
 } 
 /** 
 - DEBUG 为true时的拼接字符串 
 - @param string $level 自定义标识符 
 - @param string $info 自定义内容 
 - @param string $log_path 自定义日志路径 
 - @author widuu <admin@widuu.com> 
 */ 
 public function write_log($level,$info,$log_path = &#39;&#39; ){ 
 if( emptyempty($log_path) ){ //phpfensi.com 
  $log_path = dirname ( __FILE__ ) . "/log.txt"; 
 } 
 file_put_contents($log_path, "[$level]".date ( "Y-m-d H:i:s" ) . " " . $info . "\r\n", FILE_APPEND ); 
 } 
}
로그인 후 복사

좋아요, 위는 편집자가 편집한 Alipay 서비스 창 API 인터페이스 개발의 예입니다. 이에 대한 전제 조건은 이 공식 애플리케이션을 신청할 수 있다는 것입니다. 편집자는 그것을 소개하지 않을 것입니다.

관련 권장사항:

PHP의 Alipay 결제 인터페이스 요약

PHP Alipay 인터페이스 예시 자세히

PHP는 Alipay를 예시로 사용하여 RSA 서명 생성 주문 기능을 구현합니다.

위 내용은 PHP Alipay 개발 서비스 창 API의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 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 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25 : Myrise에서 모든 것을 잠금 해제하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

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

SublimeText3 중국어 버전

SublimeText3 중국어 버전

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

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

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

Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드 Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드 Dec 24, 2024 pm 04:42 PM

PHP 8.4는 상당한 양의 기능 중단 및 제거를 통해 몇 가지 새로운 기능, 보안 개선 및 성능 개선을 제공합니다. 이 가이드에서는 Ubuntu, Debian 또는 해당 파생 제품에서 PHP 8.4를 설치하거나 PHP 8.4로 업그레이드하는 방법을 설명합니다.

CakePHP 날짜 및 시간 CakePHP 날짜 및 시간 Sep 10, 2024 pm 05:27 PM

cakephp4에서 날짜와 시간을 다루기 위해 사용 가능한 FrozenTime 클래스를 활용하겠습니다.

CakePHP 토론 CakePHP 토론 Sep 10, 2024 pm 05:28 PM

CakePHP는 PHP용 오픈 소스 프레임워크입니다. 이는 애플리케이션을 훨씬 쉽게 개발, 배포 및 유지 관리할 수 있도록 하기 위한 것입니다. CakePHP는 강력하고 이해하기 쉬운 MVC와 유사한 아키텍처를 기반으로 합니다. 모델, 뷰 및 컨트롤러 gu

CakePHP 파일 업로드 CakePHP 파일 업로드 Sep 10, 2024 pm 05:27 PM

파일 업로드 작업을 위해 양식 도우미를 사용할 것입니다. 다음은 파일 업로드의 예입니다.

CakePHP 유효성 검사기 만들기 CakePHP 유효성 검사기 만들기 Sep 10, 2024 pm 05:26 PM

컨트롤러에 다음 두 줄을 추가하면 유효성 검사기를 만들 수 있습니다.

PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법 PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법 Dec 20, 2024 am 11:31 AM

VS Code라고도 알려진 Visual Studio Code는 모든 주요 운영 체제에서 사용할 수 있는 무료 소스 코드 편집기 또는 통합 개발 환경(IDE)입니다. 다양한 프로그래밍 언어에 대한 대규모 확장 모음을 통해 VS Code는

CakePHP 빠른 가이드 CakePHP 빠른 가이드 Sep 10, 2024 pm 05:27 PM

CakePHP는 오픈 소스 MVC 프레임워크입니다. 이를 통해 애플리케이션 개발, 배포 및 유지 관리가 훨씬 쉬워집니다. CakePHP에는 가장 일반적인 작업의 과부하를 줄이기 위한 여러 라이브러리가 있습니다.

PHP에서 HTML/XML을 어떻게 구문 분석하고 처리합니까? PHP에서 HTML/XML을 어떻게 구문 분석하고 처리합니까? Feb 07, 2025 am 11:57 AM

이 튜토리얼은 PHP를 사용하여 XML 문서를 효율적으로 처리하는 방법을 보여줍니다. XML (Extensible Markup Language)은 인간의 가독성과 기계 구문 분석을 위해 설계된 다목적 텍스트 기반 마크 업 언어입니다. 일반적으로 데이터 저장 AN에 사용됩니다

See all articles