PHP 8.5.0 RC 2 available for testing

URL İşlevleri

İçindekiler

  • base64_decode — MIME base64 ile kodlanmış verinin kodunu açar
  • base64_encode — Veriye MIME base64 kodlaması uygular
  • get_headers — Bir HTTP isteğine sunucunun verdiği yanıtta gönderilen tüm başlıkları döndürür
  • get_meta_tags — Bir HTML dosyanın meta etiketlerindeki öznitelikleri çıkarıp bir dizi olarak döndürür
  • http_build_query — URL kodlamalı sorgu dizgesi üretir
  • parse_url — Bir URL'yi bileşenlerine ayırır
  • rawurldecode — URL kodlamalı dizgenin kodlamasını kaldırır
  • rawurlencode — RFC 3986'ya uygun URL kodlaması yapar
  • urldecode — URL kodlamalı dizgenin kodlamasını çözer
  • urlencode — Dizgeye URL kodlaması uygular
add a note

User Contributed Notes 3 notes

up
3
chemanfit at hotmail
22 years ago
just a side note to the above you will need to add the ?

example

$page=$PHP_SELF."?".$_SERVER['QUERY_STRING'];
up
-1
php at malaker dot com
21 years ago
Following method do not show the URL in user browser (as the author claimed) if the code resides in the source page of FRAME or IFRAME (say SRC="sourcepage.php") . In that case the URL of the SOURCE page is displayed.

$url = sprintf("%s%s%s","http://",$HTTP_HOST,$REQUEST_URI);
echo "$url";

Expected result: http://localhost/urltest/framedpage.php

Actual result: http://localhost/urltest/sourcepage.php
up
-2
jrg45 at pantheon dot yale dot edu
23 years ago
Note that $_SERVER["HTTP_REFERER"] may not include GET data that was included in the referring address, depending on the browser. So if you rely on GET variables to generate a page, it's not a good idea to use HTTP_REFERER to smoothly "bounce" someone back to the page he/she came from.
To Top