dynamic file names? with php or otherwise

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
matstars
Forum Newbie
Posts: 7
Joined: Tue Aug 12, 2008 2:47 pm

dynamic file names? with php or otherwise

Post by matstars »

I was wondering if it were possible to accomplish dynamic file names.

Right now I am developing a site for schools and a typical link for a school would be

/schools.php?sname=ps28 for PS28

would there be any way to make a folder schools and with htaccess or otherwise accomplish:

/schools/ps28.php or /schools/ps28/ or /schools/ps28.htm

and have it call a file that sets sname to ps28 without using GET?

I hope that makes sense.

Thanks.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: dynamic file names? with php or otherwise

Post by papa »

Post Reply