Sephy Posted July 5, 2011 Report Share Posted July 5, 2011 Labsvakars, kad ludzu var iedot piemeru skriptam kas izvelas bildes/failus no foldera un ieliek tos mainigaja(ieksh array kartu failu turpmakam operacijam)?? Quote Link to comment Share on other sites More sharing options...
Maris-S Posted July 6, 2011 Report Share Posted July 6, 2011 Paskaties glob un scandir. Quote Link to comment Share on other sites More sharing options...
Sephy Posted July 6, 2011 Author Report Share Posted July 6, 2011 paldies! Quote Link to comment Share on other sites More sharing options...
Sephy Posted July 8, 2011 Author Report Share Posted July 8, 2011 (edited) Uztaisīju to savu array php! Tagad man vajag ielikt to array javascripta, lai ta vertibas varetu izmantot javascript operacijas! Ka to dara? Edited July 8, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
briedis Posted July 8, 2011 Report Share Posted July 8, 2011 Uztaisīju to savu array php! Tagad man vajag ielikt to array javascripta, lai ta vertibas varetu izmantot javascript operacijas! Ka to dara? <script> var arr = [<?=json_encode($arr);?>]; Kaut kā tā :) (varbūt tās kantainās iekavas nevajag, neatceros) Quote Link to comment Share on other sites More sharing options...
Sephy Posted July 10, 2011 Author Report Share Posted July 10, 2011 (edited) bet ja skripta un php fails ir atsevišķš? to ka viena faila ir gan skripts un php es jau zinaju ;/ p.s. pareizi ir bez kantainam iekavam, ja nu kads cits to pasu izmanto ;) Edited July 10, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
briedis Posted July 10, 2011 Report Share Posted July 10, 2011 (edited) bet ja skripta un php fails ir atsevišķš? to ka viena faila ir gan skripts un php es jau zinaju ;/ p.s. pareizi ir bez kantainam iekavam, ja nu kads cits to pasu izmanto ;) Nu tur kur tu iekļauj to skriptu, tur arī padod to mainīgo. <script type="text/javascript> var myArr = <?=json_encode;?> </script> <script src="my_script.js" type="text/javascript></script> tad iekš my_script būs pieejams globālais myArr Edited July 10, 2011 by briedis Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.