小编noe*_*eat的帖子

如何在android(manifest.json)上修复键盘上面的内容

我正在尝试将我的网站设置为在应用程序中打开,当人们将其添加到移动设备的主页时,但是当我有输入字段时,它无法正常工作.当键盘显示时它保持在内容之上,它不会调整大小.只有通过手机主屏幕上的快捷方式使用时才会发生这种情况.

这是我的manifest.json:

{
  "author": "My Name",
  "background_color": "#ffffff",
  "description": "App",
  "display": "fullscreen",
  "icons": [
    {
      "src": "https://192.168.26.183:8080/img/web-app.png",
      "sizes": "192x192",
      "type": "image/png"
    }
  ],
  "manifest_version": 2,
  "name": "App",
  "orientation": "portrait",
  "short_name": "App",
  "start_url": "https://192.168.26.183:8080/",
  "theme_color": "#ffffff",
  "version": "0.1"
}
Run Code Online (Sandbox Code Playgroud)

这是我的HTML:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
	<!-- Ask user to add to home screen -->
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<link rel="manifest" href="manifest.json">
	<style>
		* {
			margin: 0;
			padding: …
Run Code Online (Sandbox Code Playgroud)

html css mobile android

6
推荐指数
1
解决办法
199
查看次数

如何对关联记录进行分页?

Products belongsToMany Categories并且Categories hasMany Products,在我的Product视图中,我显示了所有类别的列表,但我想对这些结果进行分页或限制。

我当前的代码ProductsController是:

$product = $this->Products
    ->findBySlug($slug_prod)
    ->contain(['Metas', 'Attachments', 'Categories'])
    ->first();

$this->set(compact('product'));
Run Code Online (Sandbox Code Playgroud)

我知道我需要设置$this->paginate()对某些内容进行分页,但我无法让它对产品内的类别进行分页。我希望你们能理解我。

更新:目前我正在做这样的事情:

$product = $this->Products->findBySlug($slug_prod)->contain([
              'Metas',
              'Attachments',
              'Categories' => [
                'sort' => ['Categories.title' => 'ASC'],
                'queryBuilder' => function ($q) {
                  return $q->order(['Categories.title' => 'ASC'])->limit(6);
                }
              ]
            ])->first();
Run Code Online (Sandbox Code Playgroud)

限制有效,但我还不知道如何分页

pagination cakephp associations query-builder cakephp-3.x

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

单独的CodeIgniter公用文件夹

我一直在尝试更改CodeIgniter文件结构,使其更安全,更清洁,但我无法使其正常工作。我想分离将对用户可见的应用程序/系统和公共文件。

- application
- system
- public
Run Code Online (Sandbox Code Playgroud)

它有效,但我必须输入

example.com/public/index.php或example.com/public/controller

我希望能够像example.com/controller这样输入基本URL。

我该怎么做?

php .htaccess codeigniter

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