Dodekus Posted August 16, 2008 Share Posted August 16, 2008 Hello everyone. I would like to make a PHP code that reads all the swf-files and jpg-files from a map, and make links of the images and the swf-file names. I hope you guys understand what I mean. It's a bit hard to explain. Ask anything if you dont undestand. Quote Link to comment https://forums.phpfreaks.com/topic/119963-solved-make-links-to-swf/ Share on other sites More sharing options...
ignace Posted August 16, 2008 Share Posted August 16, 2008 I would like to make a PHP code that reads all the swf-files and jpg-files from a map well you have got my support! Quote Link to comment https://forums.phpfreaks.com/topic/119963-solved-make-links-to-swf/#findComment-617977 Share on other sites More sharing options...
Dodekus Posted August 16, 2008 Author Share Posted August 16, 2008 Ok, lets make it easier. I can personally make tha last part. I would like a php-code to make links to all swf files in a map. Quote Link to comment https://forums.phpfreaks.com/topic/119963-solved-make-links-to-swf/#findComment-617980 Share on other sites More sharing options...
ignace Posted August 16, 2008 Share Posted August 16, 2008 here hope this helps <?php $dh =@ opendir($directory); if ($dh) { while ($file = readdir($dh)) { if ($file != "." && $file != "..") { $fileInfo = pathinfo($directory . DIRECTORY_SEPARATOR . $file); if ($fileInfo["extension"] === "swf") { echo "<a href='" . $httpPathToDirectory . "/" . $file . "'>" . $file . "</a><br />\n"; } } } } Quote Link to comment https://forums.phpfreaks.com/topic/119963-solved-make-links-to-swf/#findComment-618122 Share on other sites More sharing options...
Dodekus Posted August 17, 2008 Author Share Posted August 17, 2008 Thank you really much. This solved my problem. Topic Solved! Quote Link to comment https://forums.phpfreaks.com/topic/119963-solved-make-links-to-swf/#findComment-618390 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.