PHP Classes

File: test_class_person.php

Recommend this page to a friend!
  Classes of piti   person   test_class_person.php   Download  
File: test_class_person.php
Role: ???
Content type: text/plain
Description: test file
Class: person
simple access file of object class
Author: By
Last change:
Date: 21 years ago
Size: 765 bytes
 

Contents

Class file image Download
<?php print "<body bgcolor=\"#c0c0c0\">\n"; require_once("person/person_class.php"); $person = new Person("piti","champeethong"); $person->setAge(23); if(! $person->Save("person/person.dat",$person,false)){ echo "Can not save this person"; } $person->Init(); $person->setName("wassana"); $person->setSurname("yamsang"); $person->setAge(22); if(! $person->Save("person/person.dat",$person,true)) { echo "Can not save this person"; } $person->Init(); $person->setName("pongpet"); $person->setSurname("meesub"); $person->setAddress("forture town"); if(! $person->Save("person/person.dat",$person)){ echo "Can not save this person"; } if(! $person->Display('person/person.dat')) { echo "Can not display person"; } ?>