我无法在点击事件上打开我的菜单.它会在鼠标悬停事件中打开.我知道这是一个非常简单的问题.我试过但无法解决它.我需要这个用于使用selenium的自动化,因为它不捕获鼠标悬停事件.
你可以在https://jsfiddle.net/ansari4all/ssyor80k/上查看我的代码
<div align="center" class="action_dropdown_container">
<ul class="action_dropdown">
<li>
<a href="">Action</a>
<ul>
<li>
<a href="abc.php">Edit</a>
</li>
<li>
<a href="xyz.php">View</a>
</li>
</ul>
</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
ul.action_dropdown {
font-family: "titilliumtext22l_ltmedium", sans-serif;
font-size: 12px !important;
margin: 0;
padding: 0;
list-style: none;
position: absolute;
}
ul.action_dropdown li {
display: block;
position: relative;
float: left;
}
ul.action_dropdown li ul {
display: none;
}
ul.action_dropdown li a {
display: block;
text-decoration: none;
color: #000;
background:#fff url(../../images/xadmin/action_dropdown_arrow.png) no-repeat 42px 6px;
border: 1px solid #f1f1f1;
line-height:19px;
height:19px; …Run Code Online (Sandbox Code Playgroud) 我应用了所有可能的答案,但仍然是同样的问题.也试过了
$this->db->reconnect();
Run Code Online (Sandbox Code Playgroud)
我的查询没有问题
mycode的:
public function GetdistributorsDetails($username){
$sql = "SELECT u.FirstName, u.Email, u.Telephone, u.MobileNumber, u.AlternateMobileNumber, ud.Address1, ud.Pincode,ud.City,s.Statename FROM users u JOIN userdetails ud ON ud.UserId = u.UserId JOIN states s ON s.StateId = ud.StateId WHERE u.Username = ? ";
$result = $this->db->query($sql,array($username));
return $result->result_array();
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 PHP 在 mongo db 中实现类似 MySQL 的查询,但我不知道该怎么做。
select * from stud where name like "%abc%"
Run Code Online (Sandbox Code Playgroud)
php代码:
$regex = new \MongoDB\BSON\Regex("^(.*?(\abc\b)[^$]*)i$");
$result = $db->stud->find(array('name' => $regex));
Run Code Online (Sandbox Code Playgroud)
我也尝试过这个
$result = $db->stud->find(( { name : { $regex: '*.abc.*'} } ));
Run Code Online (Sandbox Code Playgroud) 我正在尝试将 c# 应用程序转换为 php,但我停留在 C# 为基于 RIJNDAEL 算法的加密和解密提供安全类的地方。我正在尝试转换为 php。
注意:我使用的是 php 7.2,所以这个版本不推荐使用 mcrypt。
C# 代码
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace pharmarackencryption
{
class Program
{
private const string initVector = "aw90rela942f65u2";
// This constant is used to determine the keysize of the encryption algorithm.
private const int keysize = 256;
public static string Encrypt(string plainText, string passPhrase = "testing")
{
byte[] initVectorBytes = Encoding.UTF8.GetBytes(initVector);
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
PasswordDeriveBytes …Run Code Online (Sandbox Code Playgroud) 我需要生成pdf输出并将其发送到电子邮件,我收到的电子邮件没有附件我需要生成pdf输出并将其发送到电子邮件,我收到的电子邮件没有附件
require('lib/FPDF/fpdf.php');
require 'lib/PHPMailer/PHPMailerAutoload.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'hello india');
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = SmtpServer; // SMTP server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = SmtpUsername; // SMTP username
$mail->Password = SmtpPassword; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->From = FromEmail;
$mail->Port = 587; // SMTP Port
$mail->FromName = 'testing';
$mail->Subject = $subject;
$mail->Body = $body;
$mail->AddAddress($emails);
$mail->AddAttachment($pdf->Output("Test Invoice.pdf","F"), '', …Run Code Online (Sandbox Code Playgroud) 我正在尝试仅从字符串中提取 5 或 6 位数字。下面是我尝试过的代码,但它不符合预期。
$str1 = "21-114512"; //it should return 114512
$str2 = "test12345abcd"; //it should return 12345
$str3 = "12test123456testing"; //it should return 123456
function extract_numbers($string)
{
preg_match_all('/\b[^\d]*\d{6}[^\d]*\b/', $string, $match);
return $match[0];
}
print_r(extract_numbers($str1));
Run Code Online (Sandbox Code Playgroud)