Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Patricio Cardó  >  Link converter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example use
Class: Link converter
Convert URLs between absolute and relative paths
Author: By
Last change:
Date: 4 years ago
Size: 688 bytes
 

Contents

Class file image Download
<?php
include "convertir_enlace_inc.php";
$enl = new convertir_enlace($_SERVER["PHP_SELF"]);
            print 
"<br><b>".$enl->este["url"]."</b><br>";

$uri = array();
$uri["ruta1"] = "../midom.php";
$uri["ruta2"] = "C:/Inetpub/wwwroot/program/BestPractices.html";
$uri["url1"] = $enl->desde_ruta($uri['ruta1']);
$uri["url2"] = $enl->desde_ruta($uri['ruta2']);
$uri["url3"] = $enl->desde_url('http://localhost/sitios/decumano');
$uri["url4"] = $enl->desde_url('../../../../sitios');
$uri["url4"] = $enl->desde_ruta('../../../../../../../../../../../../inexistente');
print 
nl2br(print_r($enl->este,true));
print 
nl2br(print_r($uri,true));
print 
nl2br(print_r($enl->log,true));

?>