Jump to content

lnthai2002

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lnthai2002's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, Thanks for your explaination but i still dont understand completly. I can write some function (without class definition) and put in a file then call require() to include that file in other file to use it. With class definition, i HAVE to do the same thing except that i HAVE to instantiate the class which has been included before i can  use it! So what 's the point of using object oriented programming in web programming? Extra work, the same functionality and same data need to be sent over network(assumming apache server is on a different machine than the php files, thus, in order to process a completed php file, apache must fetch the class file and the main php file which uses the class!) Hope anyone can clearify my concern Thanks in advance
  2. Hi guys, I am new to php programming. I read some php book and know that i can write a class similar to java in php and save it as an inc file to instantiate latter, but i can use the require directive to load a file to the body of the php file. So the question is that which way is better in practice in order to reuse code (modularize code)? Hope to hear some suggestion. Thanks in advance Thai
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.