fassko Posted March 4, 2004 Report Share Posted March 4, 2004 taisu lapu ar clean urljiem, tachu nestraadaa nez kaapeec if, respektiivi: $url = explode("/",$PATH_INFO); ja izdrukaa $url['0'] tad vinjsh izdrukaa tachu ja paarbauda ar if() tad nekas nenotiek, respektiivi izpildaas else{} :( mekleeju googlee, bet nekaa pratiiga tur nav ... vai arii nespeeju samekleet ... Link to comment Share on other sites More sharing options...
Klez Posted March 4, 2004 Report Share Posted March 4, 2004 iedod vairaak kodu. te tax nekaa nevar saprast. Link to comment Share on other sites More sharing options...
fassko Posted March 4, 2004 Author Report Share Posted March 4, 2004 nju ar $url = explode("/",$PATH_INFO); nolasu urli izdrukaajot pirmo masiiva elementi respektiivi print "$url[0]"; viss straadaa, tachu paarbaudot to ar if: if ($url['0']="url"){echo"viss ok";} izdrukaa tukshu lapu =/ kaads vareetu luudzu k-ko pastaastiit vairaak, kursh savaa lapaa lieto shaadus clean urljus Link to comment Share on other sites More sharing options...
Roze Posted March 4, 2004 Report Share Posted March 4, 2004 saliidzinaashana ir == nevis = proti.. if ($url['0']=='url'){ ... Link to comment Share on other sites More sharing options...
fassko Posted March 5, 2004 Author Report Share Posted March 5, 2004 saliidzinaashana ir == nevis =proti.. if ($url['0']=='url'){ ... tur nav kljuuda, jo sheit es aatrumaa drukaaju ... k-kas jaanoraadi ir ieksh apache .htaccess? veel nesaprotu, ar echo izvada, bet ja paarabauda ar ifu tad nekas nenotiek =/ Link to comment Share on other sites More sharing options...
Aleksejs Posted March 5, 2004 Report Share Posted March 5, 2004 varbūt, ka galā atstarpe, vai newline - tādēļ ifs neizpildās... Link to comment Share on other sites More sharing options...
fassko Posted March 5, 2004 Author Report Share Posted March 5, 2004 kljuudu atradu un ljooti stulba, jo vinjsh explodeejot pirmais masiiva elements ir tuklsh =/ paldies Aleksej ;) tikai ir atkal jauna probleema? uz maajas servera darbinot to skriptu raada: No input file specified. urlis ir localhost/index.php/blabla/blabla/ vai kaads zin kaa atrisinaat sho probleemu? Paldies visiem, kas paliidz ;) Link to comment Share on other sites More sharing options...
CooLynX Posted March 8, 2004 Report Share Posted March 8, 2004 Nepateikšu kādu variantu labāk izmantot un kurš no tiem ir efektīvāks, bet nu es teiksim mēģinu ar šādu skriptu $url=split('/',$_GET['id']); if(is_array($url) && $url[0] != null) { echo' tālāk daram lietas '; } else { echo 'nav tur nekā '; } ($_GET vietā var likt kaut vai $_REQUEST) Tālāk var čekot uz vērtību esamību un iespējamo array, stripot slašus un darīt lietas. Reāli jau tev ir nepieciešams dabūt ārā parametrus, ko nodot caur URLi vai ne tā? Link to comment Share on other sites More sharing options...
fassko Posted March 8, 2004 Author Report Share Posted March 8, 2004 paldies CooLynX shitaa ir laba paarbaudes sheema ;) Link to comment Share on other sites More sharing options...
Recommended Posts