I am using wamp, and I have two directories; /www and /scripts. In /www I have index.html, and in /scripts I have test.php. I am not too familiar with standard PHP directory conventions, but here is what I would like to have in my index.html file
...html statements...
<run the following php script: /scripts/test.php>
...html statements
rather than include the php script itself in the index.html file.
I have researched the ScriptAlias directive in Apache (http://httpd.apache.org/docs/2.0/mod/mod_alias.html#scriptalias) but I didn’t quite understand how to apply it to this situation. Any ideas on how to proceed?
You can’t link to PHP outside the doc root from within HTML, but you can include PHP from outside the doc root from within PHP. I.e., replace the index.html with an index.php, that looks something like this: