$this->load->library('upload');
$this->load->library('email');
$this->email->set_newline("\r\n");
$this->email->from($email);
$this->email->to($cus_email);
$this->email->subject($promo_name.' Offers');
$this->email->message($remarks.'/n <img src="<?php echo base_url();?>images/promotions/<? echo $image; ?>" style="float: left;margin-top: -11px;width: 100px;margin-left:10px;" />');
// $this->email->attach($img,'inline');
// $this->email->attach($img);
$this->email->send();
Run Code Online (Sandbox Code Playgroud)
尝试包含在消息中,也尝试作为内联附件,但两者都不起作用。我需要的是当发送电子邮件并打开它时,应该看到图像。
目前我收到如下电子邮件
$remarks.'/n <img src="<?php echo base_url();?>images/promotions/<? echo $image; ?>" style="float: left;margin-top: -11px;width: 100px;margin-left:10px;" />')
Run Code Online (Sandbox Code Playgroud) 当员工登录时,我们需要自动检索当前位置并插入它。它是一个在线打卡/打卡系统。所以只是为了确保不会通过从其他地方打卡/打卡来滥用In/Out。使用http://ipinfo.io/下面提到的 Gaurang Joshi 获取互联网 IP 和纬度和 logitudes.So 我需要使用任何谷歌地图库来获取特定位置吗?如何实现它?任何帮助。
我需要在我的codeigniter网站上实现一个聊天窗口,并且聊天选项不像Facebook或gmail聊天。实时对话完全是管理员和已登录该站点的用户之间的交流,即用于直接客户服务的实时对话
提前致谢。
我无法从pdo连接获取最后一个插入ID,它总是返回0.我没有解决方案请帮助我.我的函数getConnection();
function getConnection(){
$servername="localhost";
$username="mmjadmin";
$password="gfam";
try{
$conn = new PDO("mysql:host=$servername;dbname=mmjdb",$username,$password);
$conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
return $conn;
}catch(PDOException $e){
echo "Connect to database fail " . $e->getMessage();
}}
Run Code Online (Sandbox Code Playgroud)
我调用此函数来执行其他函数以插入数据
function insertUser($username,$password){
$sql = "INSERT INTO T_Users(
username,
password,
regist_date,
update_date)
VALUES(
:username,
:password,
CURRENT_TIMESTAMP,
CURRENT_TIMESTAMP)";
$stmt = getConnection()->prepare($sql);
$stmt->bindParam(':username',$username);
$stmt->bindParam(':password',$password);
$stmt->execute();
$userid = getConnection()->lastInsertId();
}
Run Code Online (Sandbox Code Playgroud)
我无法获取我插入的最后一个用户标识,即userid是autoincrement,它总是返回0.