urlExists() 공개 정적인 메소드

So if you check on strpos(http) === 0 you can use this to check for URLs instead.
public static urlExists ( string $url ) : boolean
$url string Absolute URL
리턴 boolean Success
예제 #1
0
 /**
  * UtilityTest::testUrlExists()
  *
  * @covers ::urlExists
  * @return void
  */
 public function testUrlExists()
 {
     $res = Utility::urlExists('http://www.spiegel.de');
     $this->assertTrue($res);
     $res = Utility::urlExists('http://www.spiegel.de/some/inexistent.img');
     $this->assertFalse($res);
 }