|
Posted by Tom on 10/15/07 17:16
On 15 Oct 2007 12:07:54 GMT, Jeff Gaines wrote...
>
>As part of learning php I have set up an automated directory/file listing
>process.
>
>On my server I have a directory called 'Notes' and under that a dozen or
>so dub-directories on various topics, each containing a mix of html and
>mht files.
>
>In the Notes directory I have a php script which echoes links to each sub
>directory (excluding . and ..) and incorporates a link to a file
>'index.php' in each sub directory.
>
>In turn index.php echoes the html/mht files along with a link to them.
>
>This means that I can add/remove directories and files and they will
>automatically be included in my browser, as long as I remember to copy
>index.php to each new directory.
>
>I want to change this slightly so that clicking on a link in Notes.php
>will write a file called index.html to the selected sub directory and then
>navigate to it. This avoids having to copy index.php to each sub directory.
>
>I am OK with most of it except how to switch to the index.html file from a
>php file. I read a comment somewhere that php is not html so doesn't
>recognise links so is there a way to switch to a specified file in a
>browser from a php script please? Having re-read this I need a process
>that can call a function then activate a link to index.html in the
>appropriate directory.
>
>Many thanks.
>
I think most PHP is setup on teh web server so all .php files are parsed by PHP.
IF the file extension is .html then it would be a plain HTML file that us sent
as-is. If you didn't need any PHP code in the index pages you are creating in
those directories, it would make sense to simply use the .html version .
Tom
--
NewsGuy Takes Usenet Cellular!
Download newsgroup MP3's to your Cell or PDA
Free Trial - http://newsguy.com/cellphone.htm
Navigation:
[Reply to this message]
|