PHP

Common PHP beginner mistakes

Në shqip: Gabimet e zakonshme të fillestarëve në PHP

ShpjegimiSQ

Gabimet më të shpeshta: „Undefined array key“ (përdor ?? ose isset), „headers already sent“ (hapësirë para <?php), harrimi i pikëpresjes, == në vend të ===, dhe tekst nga përdoruesi pa htmlspecialchars().

EnglishEN

The most common mistakes: “Undefined array key” (use ?? or isset), “headers already sent” (whitespace before <?php), a missing semicolon, == instead of ===, and user text without htmlspecialchars().

Si ta mendosh

Si gurët në rrugë ku pengohet çdo fillestar.

Lexoje në anglisht

Like the stones on the path every beginner trips over.

Shembull kodiphp

$faqe = $_GET['faqe'];          // ✗ Undefined array key
$faqe = $_GET['faqe'] ?? 1;     // ✓

Terma të lidhur