Jump to content

ken.stendfield

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ken.stendfield's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I need my script to read a local file and then send it to the administrator. The sending part works perfectly, but the fopen function attempts to read the file from the server. Is there anyway to make it read from your local drive? (For example. "D:\db_backup.sq'") ? <?php $handle = fopen($filename, "rb"); $contents = fread($handle, filesize($filename)); fclose($handle); $to = "friend1@gmail.com"; $from = "friend2gmail.com"; $headers = 'From:' . $from . "\r\n" . 'Reply-To: $from' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $filename, $contents, $headers); ?>
×
×
  • 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.