English 中文(简体)
PHP strlen() and width of thestring
原标题:PHP strlen() and width of string
  • 时间:2012-01-12 03:41:19
  •  标签:
  • php
  • strlen

不知道是否有能够帮助确定这一点的营地职能。

我有几处不同的特征。 我的问题是,扼杀的时间是多久,而不是有多大的特征。

$str1 =  123456789 ;
$str2 =  akIOuNBGH ;

两者都具有9个特性。 然而,由于范围较广,第二位浏览器稍长。

最后,我要说的是,在两个阵列之后,有一系列的警示,但由于第二和第一号并非相同的宽宏,所以统一性已经消失。

Any cool ideas or ways on how to determine string width? Perhaps, if I know the width values, I can code the appended information appropriately.

最佳回答
问题回答

亲爱取决于你在客户方面代表这些方的字体。 某些字体(登字塔确切知道什么,但我认为是信使)的宽度与特性的数量直接成正比,这样简单地禁止你的方言会奏效。 对于其他方面来说,它不会发挥作用,将取决于浏览者如何做到这一点。 如果你试图调和服务器方面的座机,你将尽可能地这样做。 要求利用安保部与他们协调。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...