I have created a dropdown box on the add/edit pages. I need to populate it with a list of files from a directory. I have the code to create the dropdown (see below) but where can I overwrite the phprunner generated code.
EDIT
I have put the code below in include/seo_settings.php
It works but can anyone tell me if this is the correct way to do it. Obviously this will get overwritten each time I make a new build as I edit the site.
$dirPath = dir('/home/kentwind/public_html/');
$fileArray = array();
while (($file = $dirPath->read()) !== false)
{
if (substr($file, -3)=="php")
{
$fileArray[ ] = trim($file);
}
}
$dirPath->close();
sort($fileArray);
$c = count($fileArray);
for($i=0; $i<$c; $i++)
{
$fdata["LookupValues"][]= $fileArray[$i];
}
Any ideas please?