Jump to content

poo with php

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
dimitry

dimitry

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
Hi!
so hard to find good and complete tuto on the net about POO('don't know how it is in english... perhaps programming by object...?) in php, so, I've got the following question: What can I do to call a class who is not in the file I use?

I know the syntaxe "new myClass();" but it doesn't work... I don't use any framework and I'm calling this class from the index in classic php...
Have you got an idea what's wrong (for this message:
"Fatal error: Class 'Html' not found in C:\...\index.php on line 5"[I've called my class Html])?

Thanks from advance!
Bye!
Lord Darkdriver by Dimitry

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
You need to include the class in your scope. You might check for caps or not. Is it "html" or "HTML" or "Html".

It's OOP in English but I figured POO was the same thing.

#3
dimitry

dimitry

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
Thank you!
It works! You've right, it was only the include I needed and change the symbols for my comments: I've put "//" and "/*" only closed (*/) some lines under...
This subject can be closed!
Bye!
Lord Darkdriver by Dimitry

#4
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
by the way, it's called OOP (Object Oriented Programming). the other one I hope you do on your toilet :-)
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall