我正在尝试让 MAMP 与 PHP 8.1 一起运行,但我看到的 MacOS 最新版本是 8.0.8,有没有办法运行 8.1 ?
我已经阅读了许多教程,其中解释了如何从已安装的版本之一进行切换,但我似乎找不到安装其他 PHP 版本的方法。
我希望窗口仅在pop_up单击时关闭(而不是单击div内容).例如,单击背景图层会隐藏div.在下面的代码中,我不希望它#pop_up仅在"pop_up"上单击div内容bot时关闭.
我怎样才能做到这一点?
$("#pop_up").click(function() {
$("#pop_up").hide();
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="pop_up">
<div id="pop_up_content">
<h1> world </h1>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
好吧所以问题对我来说基本上是未知的,从来没有过.我今天尝试添加bxslider,但它似乎无法正常工作.我尝试使用他提供的其他版本的JS,但同样的事情发生,图像继续"加载",他们永远不会加载.我做了检查元素,这就是我得到的
jQuery.Deferred异常:无法读取未定义的属性'indexOf'TypeError:无法在jQuery.fn.load中读取未定义的属性'indexOf'(file:/// C:/ Users/Oploditelj/Desktop/domaci_last/js/jquery- 3.0.0.js:9612:12)在HTMLImageElement.(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js:10:4394)在Function.each(file:/// C:/ Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js:359:19)at jQuery.each(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js:152 :17)在HTMLImageElement.(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js:10:4355)在Function.each(file:/// C:/ Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js:359:19)at jQuery.each(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js:152 :17)at g(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js:10:4295)at c(file:/// C:/ Users /Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js:10:4180)在d(file:/// C:/Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider. min.js:10:2570)未定义
我使用的代码与他们网站上的代码完全相同.
<head>
<script type="text/javascript" src="js/jquery-3.0.0.js"></script>
<script src="js/plugin/jquery.bxslider.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/plugin/jquery.bxslider.css"/>
<script type="text/javascript" src="js/skripta.js"></script>
</head> <!-- Head ends -->
Run Code Online (Sandbox Code Playgroud)
当然我在单独的.js文件中调用它
$(document).ready(function() {
$('.bxslider').bxSlider();
});
Run Code Online (Sandbox Code Playgroud)
身体是
<body> <!-- Body start -->
<ul class="bxslider">
<li><img src="js/plugin/images/pic1.jpg"/></li>
<li><img src="js/plugin/images/pic2.jpg"/></li>
<li><img src="js/plugin/images/pic3.jpg"/></li>
</ul>
</body><!-- Body ends -->
Run Code Online (Sandbox Code Playgroud) 好的,所以我尝试使用 SHA 512 验证密码,但无论如何它仍然返回 false,就像哈希检查不正确一样。
注册时生成哈希
$hashed = password_hash(hash('sha512', $password), PASSWORD_DEFAULT);
Run Code Online (Sandbox Code Playgroud)
并验证(登录时)我使用简单
public function isValidLogin($username, $password) {
$sql = $this->connect();
$sql->real_escape_string($username);
$sql->real_escape_string($password);
$res = $sql->query("SELECT password FROM users WHERE name='".$username."'");
if ($res->num_rows >= 1) {
while($row = $res->fetch_assoc()) {
if (password_verify(hash('sha512', $password), $row['password'])) {
return true;
}
}
}
return false;
}
Run Code Online (Sandbox Code Playgroud) 我使用 CI_Minifier 并且在更新我的 PHP 后遇到了问题。
现在我在使用该preg_match功能时收到错误消息。
if (!preg_match("/^[\w-:]+$/", $tag)) { #error line
$node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
if ($this->char === '<') {
$this->link_nodes($node, false);
return true;
}
if ($this->char==='>') {
$node->_[HDOM_INFO_TEXT] .= '>';
}
$this->link_nodes($node, false);
$this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next
return true;
}
Run Code Online (Sandbox Code Playgroud)
错误是:
编译失败:字符类中偏移量 4 处的范围无效
嗯,您好,我如何让这个控制台写一行?我设法使它在处理时运行cmd.exe,但它没有写入行.
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "alpha")
{
progressBar1.Value = 100;
if (progressBar1.Value == 100)
{
MessageBox.Show("Welcome back master!");
System.Diagnostics.Process.Start(@"C:\Windows\System32\cmd.exe");
Console.WriteLine("Hello!!!");
}
}
Run Code Online (Sandbox Code Playgroud) javascript ×2
jquery ×2
php ×2
bxslider ×1
c# ×1
codeigniter ×1
hash ×1
macos ×1
mamp ×1
preg-match ×1
sha512 ×1