View Single Post
  #1 (permalink)  
Old 10-18-2007, 12:41 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,122
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Icon9 Calling a method on the other file..? - help!

I'm just wondering on what happen here:

a.php
PHP Code:
class {
    
public function A1() {

    }

    
public function A2() {

    }

b.php
PHP Code:
class {
    
A1(); // can I do this
    
A a// or I have to do this first, and then...
    
a.A1();

Thanx, I'm just wondering on how does Object Oriented work in PHP..?

ADD:
where does b.php have to be? can a.php in the sub folder of where b.php is..? so say here's the structure:

b.php
- folder AScript
----- a.php

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by HelloWorld : 10-18-2007 at 12:44 AM.
Reply With Quote