小编Jér*_*ont的帖子

PDO :: PARAM_FLOAT不存在,为什么?

我想知道为什么PDO :: PARAM_FLOAT不存在以及什么可以取代它?

php sql pdo

10
推荐指数
1
解决办法
1万
查看次数

实例化时的PHP类成员访问

我有PHP 5.4的新语法的问题我的代码在实例化时具有成员访问权限

$oClass = (new Foo)->bar();
$oClass->bar2();
Run Code Online (Sandbox Code Playgroud)

我收到这个错误

致命错误:在非目标上调用成员函数bar2()

为什么?

编辑:我添加return $this;了方法Foo :: bar(),现在它的工作原理

php oop

2
推荐指数
1
解决办法
1598
查看次数

为什么我的If语句接受PHP中不正确的String条件?

我很困惑,因为PHP接受以下条件.

<?php
   $b = true;
   if($b == 'anything') 
      echo 'ok';
   else
      echo 'no';
?>
Run Code Online (Sandbox Code Playgroud)

好吧,PHP显示ok.我还是不明白怎么可能.

也许,你可以为我澄清一下.

php string conditional-statements

2
推荐指数
1
解决办法
102
查看次数

Fancybox - 如何从网址加载图片?

我想知道如何创建一个灯箱,用照链接的网址加载页面中的图像

这是我的代码,但它不起作用:

   $("a.picture").click(function() { 
        $.fancybox({ 
           'padding'           : 0, 
           'overlayShow'   : false, 
           'transitionIn'  : 'elastic', 
           'transitionOut' : 'elastic', 
           'titlePosition' : 'over', 
           'type' : 'image', 
           'titleFormat'   : function(title, currentArray, 
currentIndex, currentOpts) { 
            return '<span id="fancybox-title-over">' + (currentIndex + 
1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + 
title : '') + '</span>'; 
           } 
        }); 
        return false; 
    }); 
Run Code Online (Sandbox Code Playgroud)

和HTML代码

<a class="picture" href="http://localhost/test/my_page.html" title="Picture Page">Link</a>

谢谢!

javascript jquery fancybox

0
推荐指数
1
解决办法
5531
查看次数

CSS"not"选择器不起作用

我不能在"not"选择器中放两个不同的规则示例:

此代码有效:

input:not([type=submit]) {
  // Styling here
}
Run Code Online (Sandbox Code Playgroud)

但是这段代码不起作用:

input:not([type=submit], [type=reset]) {
  // Styling here
}
Run Code Online (Sandbox Code Playgroud)

为什么第二个代码不起作用?

css

0
推荐指数
1
解决办法
76
查看次数

标签 统计

php ×3

conditional-statements ×1

css ×1

fancybox ×1

javascript ×1

jquery ×1

oop ×1

pdo ×1

sql ×1

string ×1