andrisp Posted November 22, 2005 Report Share Posted November 22, 2005 (edited) if fails uz servera: es pludmalē IMG_0-+''..967.jpg browsera pieprasiijumaa tas izskataas shaadi: es%20pludmalē%20IMG_0-+''..967.jpg Firefox'am nezkaapeec vieniigajam atgriezh sho failu, bet Opera un IE itkaa neatrod vinju. noskaidroju, ka vainiigas ir garumziimes.. kaa lai atrisinu sho probleemu ? ieveeroju, ka firefox vieniigais 'ē' simbolu pārvērš par %E7 .. kaa lai dabonu lai IE un Opera un citi browseri arii taa dara ? saprotu, ka vajag veikt to konvertaaciju jau pirms html gjenereeshanas, laikam ar urlencode, bet shitaa funkcija atstarpes paartaisa par +, ko es nesaprotu.. vai tad vinjam nevajadzeetu paartaisiit par %20 ? paldies Edited November 22, 2005 by andrisp Link to comment Share on other sites More sharing options...
rpr Posted November 22, 2005 Report Share Posted November 22, 2005 nezinu vai liidzees ar garumziimeem, bet var meegjinaat shadi: function Escape ($strings) { $strings = bin2hex($strings); $strings = chunk_split($strings, 2, '%'); $strings = (empty($strings) ? '' : '%') . substr($strings, 0, strlen($strings) - 1); return strtoupper($strings); } Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2005 Author Report Share Posted November 22, 2005 atklaaju, ka rawurlencode() ir iistaas zaales :) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 22, 2005 Report Share Posted November 22, 2005 un kaadeelj fails kurm ir garumziimes utt buutu vispaar jaglabaa uz servera? es saprotu ka useri vienmeer patcentiisies ielaadeet neatljautus failus...... dari taa peec bildes sanjemshanas to nosaukumu apstraadaa..... paarsauc visas garumziimes par parastiem latiinju burtiem, tuksumus un visu paareejo kas naff atljauts par _ visus _ kas ir vairaak kaa 1 reizi nolikvideepeec tam novaac _ no priekshas un aizmugures vailu parveido uz mazakiem burtiem..... Un nebuus beedu :) aa un paskaties vai faila garums naff paaraak liels labaak ne vairaak kaa 16 simboli..... Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2005 Author Report Share Posted November 22, 2005 (edited) lieta taada, ka man failu nosaukumi ir jaasaglabaa taadi kaadi vinji ir :/ bet ar to rawurlencode viss rukaa tiiri labi :) Edit: rpr tavs variants baigi brutaals :) Edited November 22, 2005 by andrisp Link to comment Share on other sites More sharing options...
Klez Posted November 22, 2005 Report Share Posted November 22, 2005 $fname = substr(md5($filename),0,8) . $ext; bet nu ja vaig orginaalos faila nosaukumus tad citu variantu vaig ... veel DB var glabat base64encode($filename) un tad browserii <a href="<?=base64_decode($filename)?>">fails</a> Link to comment Share on other sites More sharing options...
bubu Posted November 22, 2005 Report Share Posted November 22, 2005 lieta taada, ka man failu nosaukumi ir jaasaglabaa taadi kaadi vinji ir :/ Un ja es uzlikšu japāņu windowsu, un mēģināšu uploadot japāniski nosauktu faili ar kanji hieroglifiem, tad tavs skripts arī strādās un normāli pieseivos uz diska? Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2005 Author Report Share Posted November 22, 2005 bet vai vispaar varees uploadeet ? vai pats php maacees apieties ar taadiem simboliem ? Link to comment Share on other sites More sharing options...
Klez Posted November 22, 2005 Report Share Posted November 22, 2005 protams ka maacees. php straadaa ar tmp_name taatad faila nosaukumam nau nekaadas noziimes. Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2005 Author Report Share Posted November 22, 2005 aa nu jaa.. neaizdomaajos :) Link to comment Share on other sites More sharing options...
Recommended Posts