overmind Posted October 4, 2007 Report Share Posted October 4, 2007 Tātad mazs galerijas skriptiņš. Zem bildes tiek izvadīts bildes nosaukums bet ar visu .jpg, ko lai dara lai izvadiitu bez shii .jpg beigaas. Paste Link to comment Share on other sites More sharing options...
Val Posted October 4, 2007 Report Share Posted October 4, 2007 atrodi pēdējā punkta pozīciju iekš $file pēctam nolasi no stringa sākuma līdz turienei. http://lv.php.net/strings Link to comment Share on other sites More sharing options...
andrisp Posted October 4, 2007 Report Share Posted October 4, 2007 echo substr('12345.jpg', 0, -4); Link to comment Share on other sites More sharing options...
overmind Posted October 4, 2007 Author Report Share Posted October 4, 2007 Paldies andrisp ! Vēl viens jautājums pie reiz. Piemirsiesusies ši lieta - webroot\moddules\user\cpanel.php ir rindinja require("denied.php"); bet fails staav webroot\includes\ folderii.. kas bij jāliek pirms faila nosaukuma? ../../ .... ? :] Link to comment Share on other sites More sharing options...
xPtv45z Posted October 4, 2007 Report Share Posted October 4, 2007 Starp citu, kurš variants strādātu ātrāk? Val minētais vai, kā es pagaidām taisu. $temp = explode('.', $filename); unset($temp[count($temp)-1]); $filename = implode('.', $temp); Link to comment Share on other sites More sharing options...
andrisp Posted October 4, 2007 Report Share Posted October 4, 2007 Ja nesaputrojos, tad: require('../../includes/denied.php'); Link to comment Share on other sites More sharing options...
Val Posted October 4, 2007 Report Share Posted October 4, 2007 par #3 postu: viss ir labi līdz kamēr visiem failiem paplašinājums būs 3 simb. Link to comment Share on other sites More sharing options...
Recommended Posts