[ create a new paste ] login | about

Link: http://codepad.org/6qdtdHy6    [ raw code | output | fork ]

PHP, pasted on Aug 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
   class PageClass {


    private $absolute_path = NULL;
       
    public function set_absolute_path($path){
        $this->absolute_path = $path;   
    }

    public function get_absolute_path(){
        echo $this->absolute_path;
    }

}

$page = new PageClass();
$page->set_absolute_path("http://localhost:8888/smile2/organic/");

$page->get_absolute_path(); //this should echo the URL as defined above - but does not
?>


Output:
1
http://localhost:8888/smile2/organic/


Create a new paste based on this one


Comments: