php生成单号的函数
<p>在开发订单系统的时候,我们会经常用到订单号,订单号如何生成不重覆的?下面我们通过redis方法生成</p> <pre><code>function getOrderCode($prefix, $module, $length = 4) { $key = 'order_code:'.$module;...
51工具盒子
<p>在开发订单系统的时候,我们会经常用到订单号,订单号如何生成不重覆的?下面我们通过redis方法生成</p> <pre><code>function getOrderCode($prefix, $module, $length = 4) { $key = 'order_code:'.$module;...
数字转中文方法: function numToWord($num) { $chiNum = array('零', '一', '二', '三', '四', '五', '六', '七', '八', '...
<p>php 导出csv文件方法</p> <pre><code>public static function exportCsv($data, $titleArr, $fileName = '') { $csv_data = ''; /** 标题 */ ...
<p>伪静态规则的好处就是:可以通过URL重写隐藏应用的入口文件 index.php。</p> <p>由于ThinkPHP版本很多,例如:3.x、5.x、6.x。我这里以ThinkPHP5.0为示例;下面是相关服务器的配置参考:</p> <h2>一、Apache伪静态规则</h2> <p>1、h...
<p>1、文件路径: app/Request.php</p> <pre><code> <?php namespace app; <p>// 应用请求对象类 class Request extends \think\Request { protected $filt...
<p>英文:</p> <p>How can I use htaccess to run a template-like php script with a url pointing to a file that doesn't exist?</p> <h1>问题 {#heading}</h1> &l...
英文: WebStorm/PhpStorm gives "Mismatched property value" error when using CSS lvh unit 问题 {#heading} ============= 使用"new" CSS 单位会导致"不匹配的属性值"错误 {#new-css-} ...
英文: Character encoding problem - I suppose (UTF-8 - JS and Windows1250 - PHP) 问题 {#heading} ============= 我已解决了迄今为止的所有问题,都是通过搜索这个论坛来解决的,但现在我遇到了一个难题.. ![Character encoding problem – 我想 (...
英文: How to get full size image url from WordPress sized image with PHP 问题 {#heading} ============= 以下是您要翻译的内容: "使用了两种类似问题的两种方法:<https://stackoverflow.com/questions/28945473/get...
英文: Why does php only work in some directories of my Nginx webserver? 问题 {#heading} ============= I had my Nginx web server set up just the way I needed it to work - but now I need it t...