|
Posted by Captain Paralytic on 10/15/07 12:23
On 15 Oct, 13:07, "Jeff Gaines" <jgaines_new...@yahoo.co.uk> 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.
>
> --
> Jeff Gaines Damerham Hampshire UK
> There are 10 types of people in the world, those who do binary and those
> who don't.
I think you are looking for the header() function
Navigation:
[Reply to this message]
|