Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6242
ipv6-localhost.php
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:53 PM
2014-11-21 22:53:07 (UTC+0)
Size
697 B
Referenced Files
None
Subscribers
None
ipv6-localhost.php
View Options
<?php
$hostName
=
'[::1]'
;
print
'<html>
<head>
<title>IPv6 Localhost</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Localhost</h1>
<p>The IPv6 address for localhost is '
.
$hostName
.
'</p>'
;
$host
=
(
$hostName
==
'['
.
substr
(
$hostName
,
1
,
strlen
(
$hostName
)
-
2
).
']'
)
?
substr
(
$hostName
,
1
,
strlen
(
$hostName
)
-
2
)
:
$hostName
;
if
(
filter_var
(
$host
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV6
)
)
{
$hostName
=
str_replace
(
'['
,
'['
,
$hostName
);
$hostName
=
str_replace
(
':'
,
':'
,
$hostName
);
$hostName
=
str_replace
(
']'
,
']'
,
$hostName
);
}
print
'
<p>It may be changed to '
.
$hostName
.
' before is is parsed.</p>
</body>
</html>'
;
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5789
Default Alt Text
ipv6-localhost.php (697 B)
Attached To
Mode
T23261: MediaWiki cannot recognize urls pointing to ipv6 hosts
Attached
Detach File
Event Timeline
Log In to Comment