Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ryan Hellerud
3,635 PointsLinking files dynamically through php or javascript?
Guys, I am looking at how to link files into my html from my local server using javascript or php. I'm not sure which and have never done something like this so I could really use some help and any relavant ideas. Instead of my trying to re-write the situation I would like to point to my stack-overflow question. There is one answer but it is not complete but he does a good job in sumerizing the problem and helped me think it through. I just need a little more help in implementation. The SO link is http://stackoverflow.com/questions/27073133/need-help-parsing-files
4 Answers
thomascawthorn
22,986 PointsLike others have said, I still don't really have a grasp on what your goal is. Try and clarify what you're planning on doing so we can help a little better :-)
Ryan Hellerud
3,635 PointsI think I'm just going to do it l by hand. the one guy who answered the question basically had it down, if you read his post he explains mostly what I'm trying to do, I think. basically automate the process of adding links linking to files on my Web server. I have been doing them all by hand.
thomascawthorn
22,986 PointsIf you have to repeat the same process more than once, it's always worth writing code to handle that for you :-)
You're scanning a directory to see what links should exist?
You could always scan on load, add to the session to save ongoing loads?
Ryan Hellerud
3,635 Pointsi think its a little more complicated than that, which is why i posted on stack overflow. I'd have to rename all file names and its actually a little easier to just hard code it at this point because i can do it really quickly using brackets.