小编Ank*_*hah的帖子

如何找到没有空格的连续字符串或数字?

在abc表中我有电话号码字段.

在那个领域我有以下记录:

123456789
123 456 789
12345 5678
787878787
144444444
Run Code Online (Sandbox Code Playgroud)

我想只搜索没有任何空格的记录,以便查询给出结果:

123456789
787878787
144444444
Run Code Online (Sandbox Code Playgroud)

那应该是什么查询?

mysql

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

从递归数组中删除标签

我有以下递归数组作为输出

我已经访问过PHP:将标签从 array_values() 内的值中删除

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => <td>1</td>
                )

            [1] => Array
                (
                    [0] => <td align="left">Normal</td>
                )

        )

    [1] => Array
        (
            [0] => Array
                (
                    [0] => <td>1</td>
                )

            [1] => Array
                (
                    [0] => <td align="left">Normal</td>
                )

        )
)
Run Code Online (Sandbox Code Playgroud)

所以对于<td>1</td>will be 1& <td align="left">Normal</td>will beNormal

想要strip_tags我的递归数组。

php arrays recursion strip-tags

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

Docker:您的系统中缺少请求的 PHP 扩展 bcmath

安装 bcmath 时出现以下错误

root@cfe90ea33de0:/var/www/web# apt install php-bcmath
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php-bcmath is a virtual package provided by:
  php7.3-bcmath 7.3.14-1~deb10u1 [Not candidate version]
  php7.3-bcmath 7.3.11-1~deb10u1 [Not candidate version]
  php7.0-bcmath 7.0.33-0+deb9u7 [Not candidate version]
  php7.0-bcmath 7.0.33-0+deb9u6 [Not candidate version]

E: Package 'php-bcmath' has no installation candidate
Run Code Online (Sandbox Code Playgroud)

我尝试使用以下命令仍然相同的错误

apt-get install php7.3-bcmath
apt-get install php7.0-bcmath
V=`php -v | sed -e '/^PHP/!d' -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'` \apt-get install php$V-bcmath
Run Code Online (Sandbox Code Playgroud)

bcmath docker

0
推荐指数
2
解决办法
2716
查看次数

AWS - Cloudfront / S3 - 访问被拒绝

在此输入图像描述

我的网站位于 AWS EC2 实例上。它有 Cloudfront 和 S3 存储桶。

当我尝试访问我的网站时。我不断收到拒绝访问错误。

我不确定我缺少什么配置。

以下是我的存储桶策略。

{
    "Version": "2008-10-17",
    "Id": "PolicyForCloudFrontPrivateContent",
    "Statement": [
        {
            "Sid": "MakePublic",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::domain-cdn/*"
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

已经关注https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-access-to-amazon-s3/

我正在使用 Cloudfront & 它指向 S3 存储桶。

amazon-web-services amazon-cloudfront

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

找到不同的数字PHP

我有字符串

$ a ='123456789';

什么是公式,所以它可以给出结果,在字符串中有9个不同的数字.

如果我有

$ a ='111222333444';

所以结果应该是

4

php

-7
推荐指数
1
解决办法
75
查看次数