TP5 Request 요청 객체
public/index.php
app\index\controller\Index.php
domain());
dump($request->pathinfo());
dump($request->path());
#
dump($request->method());
dump($request->isGet());
dump($request->isPost());
dump($request->isAjax());
#
dump($request->get());
dump($request->param());
dump($request->post());
//session('name', 'onestopweb');
//cookie('email', '[email protected]');
//session(null);
//cookie('email',null);
dump($request->session());
dump($request->cookie());
dump($request->param('type'));
dump($request->cookie('email'));
#
dump($request->module());
dump($request->controller());
dump($request->action());
# URL
dump($request->url());
dump($request->baseUrl());
}
}
주소 표시줄에 입력한 링크:http://192.168.0.180:55/index/index/index.html?name=chaoyi&type=blog
효과도:string(23) "http://192.168.0.180:55"
string(22) "index/index/index.html"
string(17) "index/index/index"
string(3) "GET"
bool(true)
bool(false)
bool(false)
array(2) {
["name"] => string(6) "chaoyi"
["type"] => string(4) "blog"
}
array(2) {
["name"] => string(6) "chaoyi"
["type"] => string(4) "blog"
}
array(0) {
}
array(1) {
["name"] => string(10) "onestopweb"
}
array(3) {
["username"] => string(6) "chaoyi"
["PHPSESSID"] => string(26) "nugcsr2j9krr2lhk8bntggl412"
["email"] => string(18) "[email protected]"
}
string(4) "blog"
string(18) "[email protected]"
string(5) "index"
string(5) "Index"
string(5) "index"
string(45) "/index/index/index.html?name=chaoyi&type=blog"
string(23) "/index/index/index.html"
tp5.rar (1 KB)
4 다운로드: 0
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
HttpServletRequest 파일 객체 저장 방법핵심 코드 HttpServletRequest에서 파일 데이터를 직접 추출할 수 없으므로 MultipartHttpServletRequest로 강제 변환 MultipartHttpServletRequest multipar...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.