Nerede require_once ifadeleri, ve neden koymak gerekir?
- Always on the beginning of a file, before the class,
- In the actual method when the file is really needed
- Duruma göre değişir
- ?
Most frameworks put includes at the beginning and do not care if the file is really needed.
Using autoloader is the other case here.
Edit:
Surely, we all agree, that the autoloader is the way to go. But that is the 'other case' I was not asking here. (BTW, Zend Framework Application uses autoloader, and the files are still hard-required, and placed at the beginning).
Ben sadece bilmek istedim, neden programcılar büyük olasılıkla hiç kullanılmayacak bile dosyanın başında gerekli dosyaları dahil mi (örneğin Exception files).