<?php
$to = "somebody@example.com, somebodyelse@example.com";
$subject = "HTML email";
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// More headers
$headers .= 'From: <webmaster@example.com>' . "\r\n";
$headers .= 'Cc: myboss@example.com' . "\r\n";
// wordwrap mail message.
$message=wordwrap($message,70);
mail($to,$subject,$message,$headers);
?>
Secure file download in PHP, Security question PHP, PHP MYSQL Interview Question -Books download - PHP solutions guidelines queries update, phpmysqlquestion
Wednesday, November 26, 2008
Show inside directory file and sub directory with PHP code
//Open images directory
$dir = opendir("images");
//List files in images directory
while (($file = readdir($dir)) !== false)
{
echo "filename: " . $file . "
";
}
//Resets the directory stream
rewinddir($dir);
//Code to check for changes
closedir($dir);
?>
$dir = opendir("images");
//List files in images directory
while (($file = readdir($dir)) !== false)
{
echo "filename: " . $file . "
";
}
//Resets the directory stream
rewinddir($dir);
//Code to check for changes
closedir($dir);
?>
Code for copy one file to another file with same directory in php
- php
- $text = file_get_contents('client.html');
- $paste = file_put_contents('client2.html',$text);
- if($paste)
- {
- echo "File copied correctly\n";
- } else {
- echo "There was a problem copying the file\n";
- }
- ?>
Subscribe to:
Posts (Atom)
security header validate
HTTP Security Headers Check Tool - Security Headers Response (serpworx.com)
-
QUESTION: 1 What is the output of the following code? echo '1' . (print '2') + 3; A. 123 B. 213 C. 142 D. 214 E. ...
-
Which pillar of the AWS Well-Architected Framework recommends maintaining infrastructure as code? Operational Excellence Which of the foll...
-
Windows tool for creating a self-signed certificate. https://sourceforge.net/projects/portecle/ kindly install portecle tool from abov...