我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

WAMP哈希不生成

The following code is not generating an output in WAMP on windows.

Works fine on MAMP.

Guessing it's a missing module or something.

$reportHash = str_replace(
        array('+','/','='),
        array('-','_',''),
        base64_encode(file_get_contents('/dev/urandom', null, null, -1, 16)));

There is no /dev/urandom on Windows.

Use uniqid() for a portable random string generator or mt_rand() for a portable random number generator.

近期文章

  • 用户数据库结构
  • MySQL数据库没有用PHP更新
  • 如何防止非法提交请求?
  • 子模式中的相同反向引用,php pcre regex [关闭]
  • 如何选择提交不同的php页面的选项
  • 子类可以访问父类属性数据吗?
  • 带有IF语句路径错误的简单XML加载文件
  • 查找文本文件中发生的最大字符串
  • Mysql查询匹配的月份和年份
  • 日期出现意外错误?
  • 检索最新页面修订版的Wordpress问题
  • 将纯文本转换为数组
  • jquery联系表单php问题
  • 谁能解释这个加扰功能是如何工作的?
  • Facebook使用Codeigniter登录
  • 使用formbuilder在组合框中选择默认值
  • PHP只允许服务器访问PHP文件
  • CodeIgniter没有看到来自valum的ajax文件上传器的参数
  • 图表不会在php和mysql中生成融合图表
  • 保存在变量PHP中后无法处理卷曲响应

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华