小编sha*_*ebo的帖子

防止固定元素在 Mobile Safari 中跳转到输入焦点

我在 Safari 中遇到了一个无情的固定位置错误。我使用的是 iOS9,但我在 iOS8 中也注意到了这一点。要重现该问题(下面的示例链接):

\n\n
    \n
  1. 在整个屏幕上定位固定元素
  2. \n
  3. 用足够的内容 \xe2\x80\x93 填充它,包括带有多个输入 \xe2\x80\x93 的表单,以便它可以滚动
  4. \n
  5. 设置溢出滚动
  6. \n
  7. 在手机 Safari 中打开它
  8. \n
  9. 向下滚动直到看到第一个输入并点击它以聚焦
  10. \n
  11. 再滚动一点并聚焦下一个(并注意看起来有弹性的跳跃)
  12. \n
  13. 再滚动一点,关注下一个并继续。你关注的输入越多,跳跃就越疯狂。
  14. \n
\n\n

示例: http: //jsbin.com/zaruba/edit?html,css ,output

\n\n

任何帮助表示赞赏。

\n

css mobile-safari

5
推荐指数
1
解决办法
2761
查看次数

PHP:使用index.php作为引导程序是否安全?

我问,因为它似乎是唯一一个在适当的应用程序中调用的index.php文件是require_once引导程序文件.我假设这增加了一层安全性,但如果没有,这种模式似乎毫无意义.为什么不直接使用index.php文件作为引导程序?任何意见,警告,想法等都表示赞赏!

(顺便说一句,我的htaccess文件将所有请求路由到index.php文件......)

php security bootstrapping

4
推荐指数
1
解决办法
653
查看次数

php:file_get_contents正在剥离php代码

我正在尝试file_get_contents并输出php代码作为字符串而不进行渲染.想法是获取原始的未渲染文件内容,以便可以在textarea中编辑它们...

// file "foo.php" I'm needing the contents of
<h1>foo</h1>
<? include 'path/to/another/file' ?>

// php file that's calling the file_get_contents
<?php
    echo file_get_contents('foo.php');
?>
Run Code Online (Sandbox Code Playgroud)

上面的代码正在删除foo.php中的php include,它输出:

<h1>foo</h1>
Run Code Online (Sandbox Code Playgroud)

有谁知道如何将foo.php内容作为原始的未呈现字符串输出?

<h1>foo</h1>
<? include 'path/to/another/file' ?>
Run Code Online (Sandbox Code Playgroud)

任何帮助是极大的赞赏!

php

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

标签 统计

php ×2

bootstrapping ×1

css ×1

mobile-safari ×1

security ×1