extras mibs php7,PHP predefined variables in $_SERVER

Well, I found it was really handful if you want more flexibility when designing interchanges among some pages within a site. I output $_SERVER array under my Apache server:

Array

(

[MIBDIRS] => C:/xampp/php/extras/mibs

[MYSQL_HOME] => C:\xampp\mysql\bin

[OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf

[PHP_PEAR_SYSCONF_DIR] => C:\xampp\php

[PHPRC] => C:\xampp\php

[TMP] => C:\xampp\tmp

[HTTP_HOST] => 192.168.0.103

[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0

[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

[HTTP_ACCEPT_LANGUAGE] => zh-tw,en-us;q=0.7,en;q=0.3

[HTTP_ACCEPT_ENCODING] => gzip, deflate

[HTTP_CONNECTION] => keep-alive

[HTTP_REFERER] => http://192.168.0.103/edir-cms-v1.2/adv_playlist_rec.php?action=add&pl_id=1&mf_id=9

[HTTP_COOKIE] => style=green; __utma=1.1515997172.1334735760.1334735760.1334735760.1; __utmz=1.1334735760.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); el-finder-last-elfinder=8ea8853cb93f2f9781e0bf6e857015ea; PHPSESSID=b5apedse2kln99q7a1dnk5khv2

[HTTP_CACHE_CONTROL] => max-age=0

[PATH] => C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\

[SystemRoot] => C:\Windows

[COMSPEC] => C:\Windows\system32\cmd.exe

[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

[WINDIR] => C:\Windows

[SERVER_SIGNATURE] =>

Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Server at 192.168.0.103 Port 80

[SERVER_SOFTWARE] => Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

[SERVER_NAME] => 192.168.0.103

[SERVER_ADDR] => 192.168.0.103

[SERVER_PORT] => 80

[REMOTE_ADDR] => 192.168.0.161

[DOCUMENT_ROOT] => C:/xampp/htdocs

[SERVER_ADMIN] => postmaster@localhost

[SCRIPT_FILENAME] => C:/xampp/htdocs/edir-cms-v1.2/adv_playlist_rec.php

[REMOTE_PORT] => 4956

[GATEWAY_INTERFACE] => CGI/1.1

[SERVER_PROTOCOL] => HTTP/1.1

[REQUEST_METHOD] => GET

[QUERY_STRING] => action=add&pl_id=1&mf_id=1

[REQUEST_URI] => /edir-cms-v1.2/adv_playlist_rec.php?action=add&pl_id=1&mf_id=1

[SCRIPT_NAME] => /edir-cms-v1.2/adv_playlist_rec.php

[PHP_SELF] => /edir-cms-v1.2/adv_playlist_rec.php

[REQUEST_TIME] => 1334897502

[argv] => Array

(

[0] => action=add&pl_id=1&mf_id=1

)

[argc] => 1

)

This can be a reference for later use. And here is the official online document:

http://php.net/manual/en/reserved.variables.server.php

And here are two blogs talking about the security flaw when using PHP_SELF:[MySQL - 翻译 - 5.1 Reference Manual参考手册 - 5.1.3 Server System Variables服务器系统变量 - max_heap_table_sizemax_heap_table_sizeOption Sets Variable选项集变

小心$_SERVER['PHP_SELF]使用漏洞

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
# toplevel CMakeLists.txt for a catkin workspace # catkin/cmake/toplevel.cmake cmake_minimum_required(VERSION 3.0.2) project(Project) set(CATKIN_TOPLEVEL TRUE) # search for catkin within the workspace set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}") execute_process(COMMAND ${_cmd} RESULT_VARIABLE _res OUTPUT_VARIABLE _out ERROR_VARIABLE _err OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) if(NOT _res EQUAL 0 AND NOT _res EQUAL 2) # searching fot catkin resulted in an error string(REPLACE ";" " " _cmd_str "${_cmd}") message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}") endif() # include catkin from workspace or via find_package() if(_res EQUAL 0) set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake") # include all.cmake without add_subdirectory to let it operate in same scope include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE) add_subdirectory("${_out}") else() # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument # or CMAKE_PREFIX_PATH from the environment if(NOT DEFINED CMAKE_PREFIX_PATH) if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") if(NOT WIN32) string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) else() set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) endif() endif() endif() # list of catkin workspaces set(catkin_search_path "") foreach(path ${CMAKE_PREFIX_PATH}) if(EXISTS "${path}/.catkin") list(FIND catkin_search_path ${path} _index) if(_index EQUAL -1) list(APPEND catkin_search_path ${path}) endif() endif() endforeach() # search for catkin in all workspaces set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) find_package(catkin QUIET NO_POLICY_SCOPE PATHS ${catkin_search_path} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) unset(CATKIN_TOPLEVEL_FIND_PACKAGE) if(NOT catkin_FOUND) message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") endif() endif() catkin_workspace()在哪添加target_link_libraries(your_target_name avcodec avformat swscale)
07-16

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值