低值 - 还没有 PHP 的线索
我应该生成一个包含 15 个低值字符的字符串,但不知道它们是什么或如何生成它们。
我见过一个文件,其中包含 15 个低值字符的字符串,后跟 8 个字符的日期,它看起来只是 15 个空格。
我正在 PHP 中工作,我猜测这与十六进制有关,并从类似的事情开始,但它似乎不对:
for($ii=0; $ii<15; $ii++)
{
$strLowValues .= chr(dechex(0000));
//or
//$strLowValues .= chr(0);
}
print($strLowValues.date(Ymd));
我基本上完全迷失了,任何帮助将不胜感激!
谢谢
I'm supposed to produce a string 15 characters of Low Values but don't have a clue what they are or how to produce them.
I've seen a file which has a string of 15 characters of Low Values followed by an 8 characters of date and it simply looked like 15 spaces.
I'm working in PHP and am guessing it's something to do with hex and started with something like this but it doesn't seem right:
for($ii=0; $ii<15; $ii++)
{
$strLowValues .= chr(dechex(0000));
//or
//$strLowValues .= chr(0);
}
print($strLowValues.date(Ymd));
Am basically, completely lost, and any help would be apprecaited!
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的代码完全没有意义。
$strLowValues
是一个字符串,您将用空值填充它。然后您尝试将其视为对象(?)以将空填充字符串转换为日期字符串?这段代码应该做什么?
我建议你先学习基本的 PHP 语法。
Your code makes absolutely no sense.
$strLowValues
is a string, which you're filling with nulls. You then try to treat it an object(?) to convert that null-filled string into a date string?What is this code supposed to do?
I suggest you learn basic PHP syntax first.
“低值”一词在 PHP 中没有固有含义。
问问你的教授他想要什么。
The phrase "Low Values" has no inherent meaning in PHP.
Ask your professor what he wants.