Created
July 15, 2010 20:17
-
-
Save juniorz/477461 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
incluo a classe que eu vou usar, confiando que no "ambiente" $dir_raiz vai me dar o diretorio raiz em relação a aplicação rodando. | |
*/ | |
include($dir_raiz.'/classes/pai.php'); | |
class Filha extends Pai | |
{ | |
public $var1 = 'SimSimSim'; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Defino o diretorio raiz | |
$dir_raiz = realpath('.'); | |
//A classe que eu vou usar | |
include($dir_raiz.'/classes/filha.php'); | |
$obj = new Filha(); | |
?> | |
<pre> | |
<?=print_f($obj);?> | |
</pre> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Pai | |
{ | |
public $var2 = 'NaonaoNao'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment