我有一个div position:fixed;,我的问题是固定位置相对于所有页面,我需要固定的div保持在页面居中的其他div中,其中页边距为auto.(所以当我向下滚动页面时我想要总是把div看到同一个位置).
我使用jquery插件StickyScroll但我无法在Internet Explorer中使用它.
解决方案可以是jquery/javascript,css.
谢谢
我正在尝试将一些用户添加到我的Ldap DB中,但是当我使用一些特殊字符(如",")时,我会收到一些错误(无效的dn语法).我需要一个能够逃避所有角色的功能.我尝试preg_quote但在某些情况下我遇到了一些错误.
提前致谢
码:
$user = 'Test , Name S.L';
if(!(ldap_add($ds, "cn=" . $user . ",".LDAP_DN_BASE, $info))) {
include 'error_new_account.php';
}
Run Code Online (Sandbox Code Playgroud) 我正在将一些postgresql数据转换为PHP json_encode,但我遇到了一些问题:
json_encode为我的数据中的所有斜杠添加了一个BackSlash.
在描述中表示段落标记的结束,我认为因为反斜杠问题......
我不希望我的数组在索引为"0"的对象中,但名称为"attach:"
我的JSON输出:
{"arns":[{"arn":"CSC-ECN-NAUB109","problem":"description problem<\/p>",
"solution":"solution description<\/p>",
"0":[{"name":"jquery.png","path":"http:\/\/arn.test.pt\/uploads\/CSC-ECN-NAUB109\/jquery.png"}]}]}
Run Code Online (Sandbox Code Playgroud)
我的代码:
<?php
require('includes/connection.php');
$modelos_info = (isset($_GET['models'])) ? $_GET['models'] : "none";
if($modelos_info != "none"){
$sth = $dbh->query("SELECT * FROM arn_info JOIN upload2 ON (arn_info.arn=upload2.id_arn) WHERE modelos LIKE '$modelos_info ;%' OR modelos LIKE '%; $modelos_info ;%' ");
$sth->setFetchMode(PDO::FETCH_ASSOC);
$response = array();
$posts = array();
while($row = $sth->fetch())
{
$arn=$row ['arn'];
$problem=$row['problem'];
$solution=$row['solution'];
$name=$row['name'];
$path=$row['path'];
$posts_anexos['attach'] = $posts2;
$posts2[] = array('name'=> $name , 'path'=> 'http://arn.test.pt/' .$path);
$posts[] = array('arn'=> $arn , 'problem'=> …Run Code Online (Sandbox Code Playgroud) php ×3
css ×1
css-position ×1
escaping ×1
html ×1
javascript ×1
jquery ×1
json ×1
ldap ×1
pdo ×1
postgresql ×1
regex ×1