"Jiayi Cheng" <22*3*6*
7@s*u*e*t*u*a*e*u*a*> wrote:
> I want to Know whether is allow one station know the every station name(don't know the localtion, don'tknow the timetable, just name), to insure the station check the validity of input.
(coincidentally, this was discussed in a tutorial, yesterday)
Stations should not know (or need) the names of all other stations when sending out their queries, other than when identifying a particular destination.
But it is reasonable for each station to know other stations' names if they are being presented on the 'front' webpage of any station-server, so that the user can indicate their required destination. This is far better than having the user type in, and misspell, a station name.
There's two simple ways to create and display that webpage:
- either manually into a file, and have the station-server just deliver that file's contents, or
- have the station-server read station name from a file, each time.
You can collate all station names, simply, from the names of timetable files:
ls tt-* | cut -c4- > ALLSTATIONS