基本上我正试图这样做.
http://www.xeweb.net/2009/12/31/sending-emails-the-right-way-using-phpmailer-and-email-templates/
这是我的代码
<?php
include('class.phpmailer.php'); // Retrieve the email template required
$message = file_get_contents('mail_templates/sample_mail.html');
$message = str_replace('%testusername%', $username, $message);
$message = str_replace('%testpassword%', $password, $message);
$mail = new PHPMailer(); $mail->IsSMTP(); // This is the SMTP mail server
$mail->SMTPSecure = 'tls';
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = 'mygmailid@gmail.com';
$mail->Password = 'mypassword';
$mail->SetFrom('fromgmail@gmail.com', 'Pricol Technologies');
$mail->AddAddress('addaddress@gmail.com');
$mail->Subject = 'Your account information';
$mail->MsgHTML($message);
$mail->IsHTML(true);
$mail->CharSet="utf-8";
//$mail->AltBody(strip_tags($message));
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}
?>
Run Code Online (Sandbox Code Playgroud)
<html> …Run Code Online (Sandbox Code Playgroud) $my_alphabet = "T";
Run Code Online (Sandbox Code Playgroud)
上面的字符"T"应该打印字母表的确切位置/数字.即20
因此,如果
$my_alphabet = "A" ;
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点.
我看到将数字转换为字母...但反过来并不存在.
谢谢,Kimz
基本上我试图使用ajax概念来玩编辑功能.
大家都知道,我现在处于起步阶段,现在我从这个网址下载了一些代码. http://vitalets.github.io/x-editable/docs.html
我的代码在这里
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Ajax Edit using PHP</title>
<link href="bootstrap.min.css" rel="stylesheet">
<link href="bootstrap-editable.css" rel="stylesheet">
<script src="jquery-2.0.3.min.js"></script>
<script src="bootstrap.min.js"></script>
<script src="bootstrap-editable.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#username').editable({
type: 'text',
url: 'post.php',
title: 'Enter username'
});
});
</script>
</head>
<body>
<?php
mysql_connect("localhost", "root", "password") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
$result = mysql_query("SELECT * FROM books") or die(mysql_error());
?>
<div style="margin-top:100px;margin-left:40px;">
<?php while($row = mysql_fetch_array( $result )) { ?>
<a href="#" data-pk="<?php echo $row['book_id']; ?>" id="username"><?php echo $row['book_name']; …Run Code Online (Sandbox Code Playgroud) 我有一个像这样的html标签。
<a class="employee_details" target="_blank" href="index1.php?name=user1&id=123">User</a>
Run Code Online (Sandbox Code Playgroud)
我需要在jquery中获取两个参数值
<script type="text/javascript">
$(function () {
$('.employee_details').click(function () {
var status_id = $(this).attr('href').split('name');
alert(status_id[0]);
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
获取 javascript 中两个变量中的参数值的任何帮助。
我想使用 jQuery 在两个变量中获取 user1 和 123
谢谢金兹