leisure Posted January 5, 2006 Report Share Posted January 5, 2006 input laukaa ievada kk direktoriju piem: D:/dir1/dir2 gribu taisiit taa, lai war izmantot %root% a kaa noteikt kad pirms %root% vai pēc %root% ir kaads simbols? tb ja ievada D:/%root%/ vai %root%/dir1... bezceriigajaa gadiijumaa meegjinaashu izmantot explode(), bet wai ir weu kaadi citi warianti? Link to comment Share on other sites More sharing options...
bubu Posted January 5, 2006 Report Share Posted January 5, 2006 Nekā nesapratu. Ko kur ievada, un kas īsti tur vajadīgs? Link to comment Share on other sites More sharing options...
leisure Posted January 5, 2006 Author Report Share Posted January 5, 2006 waidziix noteikt vai pirms %root% ir kaads simbols, kad to %root% ievada formaa (input) ! Link to comment Share on other sites More sharing options...
bubu Posted January 5, 2006 Report Share Posted January 5, 2006 ar php? $i = strpos("%root%", $text); if ($i>0) { echo "Pirms %root% ir simbols!!"; } elif ($i!=-1) { echo "pirms %root% nav simbols!"; } else { echo "Nav %root% vispār!"; } Link to comment Share on other sites More sharing options...
php_Stopp Posted January 6, 2006 Report Share Posted January 6, 2006 elif ? :) Link to comment Share on other sites More sharing options...
Venom Posted January 6, 2006 Report Share Posted January 6, 2006 if (str_replace('%root%','',$text)!='') //ir teksts apkārt Link to comment Share on other sites More sharing options...
Recommended Posts