PHP Classes

File: gUrl.test.php

Recommend this page to a friend!
  Classes of Cesar D. Rodas   guaranix URL   gUrl.test.php   Download  
File: gUrl.test.php
Role: Example script
Content type: text/plain
Description: Example of how to use
Class: guaranix URL
Compare URLs and compute relative URIs
Author: By
Last change:
Date: 17 years ago
Size: 954 bytes
 

Contents

Class file image Download
<?
/*
 *************************************************************
 * guaranixURL *
 *************************************************************
 * The Author disclaims the copyright of this project *
 * You are free to do use this project for free with *
 * the only condition that do not forget that "Is better *
 * Give than Receive" *
 *************************************************************
 * Cesar Rodas <saddor@guaranix.com> *
 *************************************************************
*/
include("gUrl.php");
$url = new gUrl;
$base = "http://www.test.com/dir1/dir2/dir3/page.html";
print
$url->newUri($base,"../page1.html")."<br>";
print
$url->newUri($base,".././page1.html")."<br>";
print
$url->newUri($base,"./page2.html")."<br>";
print
$url->newUri($base,"/page3.html")."<br>";
?>