Jump to content
php.lv forumi

Extension noteiksana


Landsat7

Recommended Posts

bubu, a ja faila nosaukums ir malicious.file.exe ? tad extension tev būs file.exe, nevis tikai .exe ;)

 

ja šī problēma neuztrauc, tad var droši izmantot bubu variantu, es parasti to daru ar explode:

 

$parts = explode('.', $filename);
$extension = $parts[count($parts) - 1];

Link to comment
Share on other sites

×
×
  • Create New...