ShootingBlanks Posted May 14, 2010 Share Posted May 14, 2010 Hello. I'm very new to JS, so this may not be a difficult thing... I have a bunch of files on a server that start with "ds_" then have a number then ".php". So, "ds_1.php", "ds_2.php", "ds_3.php", etc. The numbers are all in succession (and the first one will always be "ds_1.php"), but the total number that exist changes regularly. I need a "for" loop in javascript that will run through as many "ds_x.php" pages there are. So if there are pages for "ds_1.php" through "ds_5.php", then I need code that says: "For every page on the server from ds_1.php through ds_5.php, do something." Thanks for any help that can be offered!!! Link to comment https://forums.phpfreaks.com/topic/201738-check-how-many-files-on-a-server-are-named-xxx/ Share on other sites More sharing options...
Omirion Posted May 14, 2010 Share Posted May 14, 2010 I don't think there is any way of doing that as far as i know. But here's me thinking this would be easier to do with a simple php loop and inline the JS script in it. Not very efficient but should do the job. Link to comment https://forums.phpfreaks.com/topic/201738-check-how-many-files-on-a-server-are-named-xxx/#findComment-1058353 Share on other sites More sharing options...
ShootingBlanks Posted May 14, 2010 Author Share Posted May 14, 2010 I don't think there is any way of doing that as far as i know. But here's me thinking this would be easier to do with a simple php loop and inline the JS script in it. Not very efficient but should do the job. Yeah - I figured that would be the solution. Just checking if there was another way. Thanks, though! Link to comment https://forums.phpfreaks.com/topic/201738-check-how-many-files-on-a-server-are-named-xxx/#findComment-1058357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.