ik zie dat mnijn topic is gesloten omdat het volgens sommige mensen om simpel debuggen ging. Ik werk nu al bijna 2 jaar met php, heb genoeg ervareing met andere talen waaronder JAVA, C#, ASP en ik weet echt wel wanneer ik moet debuggen en wanneer niet.
Als bewijs dat mijn topic te snel is gelsoten vond ik op PHP.net:
Als bewijs dat mijn topic te snel is gelsoten vond ik op PHP.net:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| It appears as if "include()" and "require()" cannot appear inside a class definition, but outside a class method.
For example, the construct
class A {
include ('class_a_methods.php');
}
returns an error (unexpected T_INCLUDE), but
class A {
function foo() {
include ('class_a_foo_method.php');
}
}
works as expected.
This is a slight annoyance if one wants to keep class code in manageable chunks. |