本文整理汇总了PHP中CUrl::normalizedUrlWithoutFragmentId方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrl::normalizedUrlWithoutFragmentId方法的具体用法?PHP CUrl::normalizedUrlWithoutFragmentId怎么用?PHP CUrl::normalizedUrlWithoutFragmentId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrl
的用法示例。
在下文中一共展示了CUrl::normalizedUrlWithoutFragmentId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNormalizedUrlWithoutFragmentId
public function testNormalizedUrlWithoutFragmentId()
{
$url = new CUrl("http://www.example.com");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/"));
$url = new CUrl("WWW.EXAMPLE.COM");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/"));
$url = new CUrl("93.184.216.119");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://93.184.216.119/"));
$url = new CUrl("[0:0:0:0:0:FFFF:5DB8:D877]");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://[0:0:0:0:0:ffff:5db8:d877]/"));
$url = new CUrl("http://www.example.com:443");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com:443/"));
$url = new CUrl("http://www.example.com/path/to/some%20ite%6D");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/path/to/some%20item"));
$url = new CUrl("http://www.example.com/?name=value");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/?name=value"));
$url = new CUrl("http://www.example.com/?name=value0&name=value1");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/?name=value1"));
$url = new CUrl("http://www.example.com/?name1&name0=value");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/?name0=value&name1="));
$url = new CUrl("http://www.example.com/#fragment_id");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://www.example.com/"));
$url = new CUrl("http://user@www.example.com");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://user@www.example.com/"));
$url = new CUrl("http://user:password@www.example.com");
$this->assertTrue($url->normalizedUrlWithoutFragmentId()->equals("http://user:password@www.example.com/"));
}