From Exploit to Defense: Mastering Local File Inclusion (LFI) Attacks