I'm new to SS. I've installed it and run through the tutorials successfully . Here's my question. How does SS know to use the templates and code from the tutorial directory? Why doesn't it use the mysite directory?
running on Fedora 7 with apache
installed in /var/www/html/SilverStripe
accessing my site using the url http://localhost/SilverStripe
accessing the CMS using the url http://localhost/SilverStripe/admin
It looks for the presence of a non-empty _config.php inside every top-level directory. It treats each directory that matches that criterion as "part of the silverstripe code".
After including each of the _config.php files, it then looks at the value of the $project variable, which is set to "mysite" in mysite/_config.php. It then treats that as the "project directory" and all the other folders as "module directories". In practise, the difference between the project directory and the module directories is very small: templates in the project directory will take precedence of those in other modules, if there's a conflict.
"what happens if more than one top-level _config.php has a $project defined with different values?"
Bad things. Don't do it. :-P
Technically, it would use the $project value of the last _config.php file that gets included, which I believe would be the last one in the alphabet. But, like I say, a site with two $project values set is better thought of as a broken site.