41 篇
建站知识总结与分享
搜索“url”
js 获取url的多种方式
web 0 0
263 0 2023-11-21 JavaScript
window.location.href:这个属性返回当前窗口的完整 url:如http://www.abc.com/home/index/index.html?id=1 window.location.host:获取域名,如:www.abc.com window.location.pathname:获取路...
<b>Deprecated</b>: Array and string offset access syntax with curly braces is deprecated in
taotaoit 0 0
252 0 2023-11-01 PHP
Uncaught transport.js/parseResult() error: can't parse to JSON. <br /> <b>Deprecated</b>:  Array and string offset access syntax w...
PHP:检查 URL 末尾是否包含斜杠
web 0 0
615 0 2023-06-06 PHP
PHP:检查 URL 末尾是否包含斜杠,如果包含,则直接拼接图片路径,如果不包含,则拼接/后拼接图片路径 可以直接通过rtrim去除右侧/,不论有没有/,然后再拼接/和图片路径 $url = 'http://www.baidu.com'; $url = rtrim($url,'/') . '/'; echo $url.$im...
解决url中?参数值加号‘+’丢失问题,url参数值里+获取不到
web 0 0
1443 0 2022-10-21 PHP
解决url中?参数值加号‘+’丢失问题,url参数值里+获取不到 如图: 3,在php中解决办法:把参数值中的空格替换成+ $token = str_replace(" ","+",$this->request->get('token'));
tp6路由生成的url去掉应用名的方法
web 2 0
1210 0 2022-09-20 ThinkPHP6
tp6路由生成的url去掉应用名的方法 在入口文件中判断,如果访问的url中包含admin,api等字样,则访问对应的应用;如果不包含则访问前端home应用。 具体代码:public\index.php $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST...
PHP获取当前页面完整网址URL
web 0 0
840 0 2022-07-19 PHP
<?php function get_page_url(){ $url = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') ? 'https://' : 'http://'; $url .= $_SERVER['HTTP_HO...
wordpress图片路径<?php bloginfo('template_url'); ?>/images/1.jpg
taotaoit 1 0
875 0 2022-06-23 Wordpress
wordpress图片路径<?php bloginfo('template_url'); ?>/images/1.jpg
Array and string offset access syntax with curly braces is deprecated原因
web 0 0
886 0 2022-05-23 PHP
Array and string offset access syntax with curly braces is deprecated PHP7.4不再支持使用大括号访问数组以及字符串的偏移_PHP代码 php7.4不支持数组{}写法,统一为数组[] 解决办法: seq=(ord(value{0}) % $rule...
curl通过get,post方式通过接口获取数据
taotaoit 0 0
878 0 2022-04-01 PHP
/** * 以get方式提交请求 * @param $url * @return bool|mixed */ function ZHTHttpGet($url){ $curl = curl_init(); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_s...
微信公众号自定义菜单接口invalid button url domain rid
taotaoit 0 1
1705 0 2022-03-11 微信开发
微信公众号自定义菜单接口,返回错误invalid button url domain rid 出现这个问题的原因是,网址没有写全 ,需要写上 http:// 或者 https:// 就行了
微信公众号图文上传content_source_url是否必填
taotaoit 0 0
1169 0 2022-02-24 微信开发
微信公众号图文上传content_source_url是否必填? 文档上说必填 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html 但网上有人说不是必填,实际测试,不填也可...
PHP curl 获取响应的状态码的方法
web 0 0
1397 0 2022-02-15 PHP
PHP curl 获取响应的状态码的方法 PHP curl可以从服务器端模拟一个http请求,例如抓取网页、模拟登陆等。根据选项设置,可以在curl_exec的返回结果中获取到响应头和body,但这没有响应的状态吗。想要获取状态码,需要在执行curl_exec后再通过curl_getinfo来获取。例如: $ch = cu...
thinkphp6 url details.html?id=10为什么参数都在问号后面了?
taotaoit 0 0
1241 0 2022-02-12 ThinkPHP6
thinkphp6 url details.html?id=10为什么参数都在问号后面了? tp6文档:https://www.kancloud.cn/manual/thinkphp6_0/1037508 如果你配置了: 'url_common_param'=>true 那么生成的URL地址变为: /inde...
PHP中urlencode()与urldecode()介绍与用法
web 0 0
1028 0 2022-01-21 PHP
PHP中urlencode()与urldecode()介绍与用法 <?php $str = 'http://www.baidu.com'; $str2 = urlencode($str); echo $str2; echo '<br/>'; echo urldecode($str2); ?> 输出结果 ...
thinkphp6 分页 url额外参数无效['query'=>request()->param()]
web 0 1
1489 0 2021-12-24 ThinkPHP6
tp5中分页带参数方法: ->paginate(input('pagesize/d'),false,['query' => request()->param()]) 但tp6中这样使用确实无效的, tp6中分页带参数的方法应该是 ->paginate([input('pagesize/d...
thinkphp6 url传多个参数,多个变量参数只能用数组形式
taotaoit 4 0
1956 0 2021-12-08 ThinkPHP6
thinkphp6 url传多个参数,多个变量参数只能用数组形式 url('index/blog/read', ['id'=>5]) https://www.kancloud.cn/manual/thinkphp6_0/1037508 thinkphp5中,还可以传递字符串格式 url('index/blo...
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6283841 2594 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)