PHP Include and Require (Absolute and Relative Links)

How does the include (include_once) and require (require_once) functions work?

Everytime I step away from PHP, I seem to forget how the include and require work with respect to absolute and relative links.

PHP includes the "include/require files" first 
then the paths within the include/require are located relative the new location.

P default margin different in Firefox and IE

If you notice that paragraphs, h1 and other tags have different default margin among browsers, you might want to use the following css code.

* {margin:0px;padding:0px;}

This code removes the additional spaces for all html elements.

OR

If you only want to eliminate the space for selected tags, you will need to use something like the following:

<style>
.no_extra_space 
{
margin:0px;
padding:0px;
}
</style>
<p class="no_extra_space">
</p>

Difference Between $this and self in PHP

What is the real difference between $this and self:: ?

A simple Google search will return several sites that show a definition such as this one:
“Use $this to refer to the current object. Use self to refer to the current class.”

But unless you are a PHP pro, you will need an example to illustrate this definition:

Here is an example to help you out:

class ycsoftware
{
static $stat = "static property";

public $pub='non static property';

public function test_this_self ()
{
print 'Trying to call the static member with this' . $this->stat;
// Nothing will be printed

print 'Trying to call the non static member with this' . $this->pub;
// OK 'non static property' will be printed

print 'Trying to call the static member with self' . self::stat;
// OK

print 'Trying to call the non static member with self' . self::pub
// ERROR

}
}
Use $this for non-static members

Use self:: for static members only

Reference
http://www.phpbuilder.com/board/showthread.php?t=10354489