随笔分类 - PHP
摘要:在php调用一个 Post请求接口 /** * PHP发送Json对象数据 * * @param $url 请求url * @param $jsonStr 发送的json字符串 charset=utf-8 * @return array */ function http_post_json($url
阅读全文
php解决 mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysq
摘要:The mysql extension is deprecated and will be removed in the future: use mysq 翻译: mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代。 解决方法: 打开php.ini 配置文件把 di
阅读全文
摘要:通常在统计报表中会出现 求 合计的需求 easyui-datagrid 中 实现 合计 的示例 界面 html <div style='padding:0px 0px 15px 12px ;'> <table> <tr> <td style="width:65px;">登陆时间:</td> <td
阅读全文
摘要:这个示例使用 前端 easyui-datagrid 后端 php 这里是不是 easyui-datagrid 不重要了,是将easyui-datagrid的数据转到table,再将 table导出Excel 使用了 js-xlsx js-xlsx 文件可自行搜索下载 ,参考 https://www.
阅读全文
摘要:这个示例使用 前端 easyui-datagrid 后端 php 前端 easyui-datagrid 导出Excel 使用了 datagrid-export.js datagrid-export.js 文件可自行搜索下载 优点:查询结果显示在datagrid中(可以分页),前端直接下载不用回后端,
阅读全文
摘要:这个示例使用 前端 easyui-datagrid 后端 php 前端 easyui-datagrid 导出Excel 使用了 datagrid-export.js datagrid-export.js 文件可自行搜索下载 优点:查询结果显示在datagrid中(不能分页),前端直接下载不用回后端,
阅读全文
摘要:这个示例使用 前端 easyui-datagrid 后端php 其中前端是不是 easyui-datagrid 不重要,这个方法主要是使用后端 php 来实现导出Excel 优点:现在的应用中大部分是分页显示的,在前台只显示一部分,但导出Excel是要看全部的。所以此时用前端js导出则不太好实现。
阅读全文
摘要:检查语法与逻辑的时候没有发现问题,但是页面报出了警告Warning提示,这不仅影响到体验也是属于bug的一种形式,那么该如何设置去掉? php不显示警告的方法:首先找到对应的配置文件【php.ini】;然后查找【display_errors】属性;最后就将其修改为Off,并保存重启即可。 方法一 1
阅读全文
摘要:出现 “Call to undefined function curl_init” 错误提示,没有定义的函数, 也就是php还没打开对 curl_init 函数的支持。 打开php.ini,开启 extension=php_curl.dll,去掉前面的 ; 号 重启下 apache 如果还不行则 1
阅读全文
摘要:{foreach}循环也有自身属性的变量,可以通过{$smarty.foreach.name.property}访问,其中"name"是name属性。 例 <{foreach $items as $r name=row_name }> .index包含当前数组索引,从零开始,每次循环增长1 <{if
阅读全文
摘要:效果图 html <tr> <td><label for="" class="control-label">支持协议:</label></td> <td><input type="text" class='my_input' name="agreement" id="agreement" /> </
阅读全文
摘要:php用正常的ftp_get函数下载文件速度特别慢,但是用ftp的客户端下载很快,所以换了curl的下载方式,速度正常 function file_upload($ftpIp,$ftpUser,$ftpPwd,$path,$fileSavePath){ $curlobj = curl_init();
阅读全文
摘要:在项目中要求用 Json的方式请求,并在 easyui-datagrid中实现分页。 easyui-datagrid 绑定方式 $('#grid').datagrid('options').url=url ; $('#grid').datagrid('options').queryParams=qu
阅读全文
摘要://参数 var params = {}; params['module'] = "ai"; params['action'] = "nextAiNode"; params['apiVersion'] = "1.0"; params['userId'] = ""; params['sessionId
阅读全文
摘要:javascript var arry = $("#fm").serializeArray(); // alert(arry); var url = 'Ajax-index.php?module=<{$module_name}>&action=DetailView_RecingToday_Save'
阅读全文
摘要:Smarty标签运算: 在页面上做简单的运算[temp5.html] 条件判断if 循环结构 for foreach用得比较多,foreach例子从数据库取出的数据 section功能和foreach类似,没foreach好理解 不推荐用 while temp5.html
阅读全文
摘要:$select="SELECT {$col_name} FROM woke_order where deleted=0 ".$where.$orderby ; // 取出数组 $rows=array(); $result=$db->query($select); while($row=$db->fe
阅读全文
摘要:GB2312 转换为 UTF-8 <?php $content = iconv('GB2312', 'UTF-8', $content); // $content为字符串 ?> iconv遇到不能识别的内容,会从第一个不能识别的字符开始截断,并生成一个E_NOTICE。因此后边的内容被丢弃了。 而在
阅读全文
摘要:1、在php.ini文件中改动error_reporting改为: error_reporting=E_ALL & ~E_NOTICE 2、如果你不能操作php.ini文件,你可以使用如下方法 在你想禁止notice错误提示的页面中加入如下代码: error_reporting(E_ALL^E_NO
阅读全文
摘要:1.在php.ini中打开extension=php_oci8扩展,重启服务。 2.将php/ext目录下的php_oci8.dll文件拷贝到system32目录下 3.安装 Oracle9i客户端精简版 后重启电脑 配置: 查询: 插入:
阅读全文