Selecting files from server with php

Selecting files from server with php

am 01.02.2008 18:49:29 von MarkHowardJr

Hi i made a little app that opens a html file into fckeditor then
after edit saves the html file.

I would like to add a drop down list or whatever is best, so i can
select from files on the server to edit. How would I accomplish this
task.. in the simplest form since I am a newbie..

Thanks much

Re: Selecting files from server with php

am 01.02.2008 21:34:15 von petersprc

Use glob to get the files and onChange to switch:



Script below:

[file.php]


error_reporting(E_ALL | E_STRICT);

$file = isset($_GET['file']) ? $_GET['file'] : false;

// Select box

$sel = '\n";

// File content

$content = '';
if ($found) {
$content = htmlentities(file_get_contents($file),
ENT_QUOTES);
}

?>


File not found.






File






Content










On Feb 1, 12:49 pm, Dual_b00t wrote:
> Hi i made a little app that opens a html file into fckeditor then
> after edit saves the html file.
>
> I would like to add a drop down list or whatever is best, so i can
> select from files on the server to edit. How would I accomplish this
> task.. in the simplest form since I am a newbie..
>
> Thanks much