Jump to content

skulky

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

skulky's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am trying to send emails to an external mail server. The website resides on an IIS server. Is there something I need to change inside the ini_set so that emails will go directly to the external mail server? ini_set("SMTP","mail.domain.com"); ini_set("sendmail_from", "user@domain.com"); Thanks.
  2. Hi there, I need to check for a specific extension (eg: ".txt") inside a directory. If the files are there they get listed in a table. If they are not then the user gets a message saying eg: "No such files here". Here is what I have so far...I can't seem to display the "No such files here" message without repeating several times with the loop. $fileList = scandir($dir); rsort($fileList); //to see the latest file on top function extCheck($fileArray, $filename, $extAllow){ if(substr($fileArray[$filename],-3,3)==$extAllow){ $GLOBALS['list'] = $list; $list = "<a href=\"".$urlClientString.$fileArray[$filename]."\" >".$fileArray[$filename]."</a>". " - added on ". date ("F d Y", filemtime($fileArray[$filename])). "<br/>"; echo $list; } else { unset($fileArray[$filename]);//trying to delete all files, except the ones with ".txt" extension //The array seems to refill itself each time though } } for($fNum=0,$fCount = count($fileList); $fNum<$fCount; $fNum++){ extCheck($fileList, $fNum, "txt"); } if(!$list){//Checking if $list contains any string... echo "There are no reports in your database."; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.