PHP Classes
Icontem

File: gUrl.test.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Cesar D. Rodas  >  guaranix URL  >  gUrl.test.php  
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
 

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>";
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products