Hi

I have made a template with a flash header and it's work fine. But now I wish to integrate a jukebox in it. I use a little php file write like that:

<?php
$handle=dir("../../../files/");/* items upload from flexinode */
while ($file = $handle->read())
{
if(strtolower(substr($file, -3)) == "mp3")
{
$pics[] = $file;
}
}
$handle->close();
print implode("\n", $pics);
?>

When I load a page with the same flash without drupal, the Flash return to me all the mp3 in the files directory, but within Drupal, nothing.

Can someone give me a hint about this phenomena?

Is Drupal have a security rules that unauthorize other php than is own?

Thank!

Comments

Steven’s picture

When you include a PHP file, the current working directory is not changed. If think if you remove the "../../..", it will work.

pgtremb’s picture

The price is right!

Thank a lot!