Hi,
What i am trying to do is pull a load of file names from a database which i can edit. These files relate to files on the webserver.
e.g. index.php
I want to be able to open these files in FCKedit. So what i am doing is streaming the html into a file using the code:
$filename = '\index.php';
$location = $_SERVER["DOCUMENT_ROOT"];
print($location.$filename);
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($location.$filename));
fclose($fp);
$oFCKeditor->Value = $contents;
However i can get this working. The file structure of my server is
wwwroot>villa>admin>editor
the html files i want to edit are in villa. the FCKeditor files are in edit. And the page i want to include the editor into is in admin directory.
My webpages use relative SRC's e.g. <img src="images/image.gif">
How would i go about doing this so A) It finds the files that i want it to use B) The images show up.
P.S I have had this working once breifly but the images wouldn't work.
Ta
Andrew
What i am trying to do is pull a load of file names from a database which i can edit. These files relate to files on the webserver.
e.g. index.php
I want to be able to open these files in FCKedit. So what i am doing is streaming the html into a file using the code:
$filename = '\index.php';
$location = $_SERVER["DOCUMENT_ROOT"];
print($location.$filename);
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($location.$filename));
fclose($fp);
$oFCKeditor->Value = $contents;
However i can get this working. The file structure of my server is
wwwroot>villa>admin>editor
the html files i want to edit are in villa. the FCKeditor files are in edit. And the page i want to include the editor into is in admin directory.
My webpages use relative SRC's e.g. <img src="images/image.gif">
How would i go about doing this so A) It finds the files that i want it to use B) The images show up.
P.S I have had this working once breifly but the images wouldn't work.
Ta
Andrew