On 6/7/07, Steve Marquez <[EMAIL PROTECTED]> wrote:
Greetings. I just want to say thanks for the help over the past couple of
days.

I am trying to get a form to delete a file.

If the file ends in .php, then I want it to unlink from a certain folder.
However, if the file ends in .html or .htm, I want it to unlink from another
folder.

Is there any way to do this?

Thanks,

--
Steve M.


<?
$extension = str_replace('.','',strtolower(strrchr('installer.php',".")));

if($extension == "php") {
   // Do your unlink() routine for PHP here.
} elseif(strstr($extension,"htm")) {
   // Do your unlink() routine for .htm/.html files here.... will
also do .phtml, etc.
}
?>


--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to