
php
简单学习php 后台服务
web修理工
这个作者很懒,什么都没留下…
展开
-
微信获取code和openid
微信获取code和openid$url = urlencode(服务器上面用户的访问路径);$appId = 微信公众号的唯一标识号;$redrecite_url = https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appId&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect转载 2020-09-10 10:08:06 · 767 阅读 · 0 评论 -
分割字符串
//利用 explode 函数分割字符串到数组复制代码代码如下:<?php$source = "hello1,hello2,hello3,hello4,hello5";//按逗号分离字符串$hello = explode(',',$source);for($index=0;$index<count($hello);$index++){echo $hello[$index];echo "</br>";}?>//split函数进行字符分割// 分隔符可以是斜线原创 2020-09-10 10:05:22 · 251 阅读 · 0 评论 -
PHP遍历数组的几种方法
一、使用for语句循环遍历数组<?php$arr = array('http://www.cnblogs.com/','博客园','PHP教程'); $num = count($arr);for($i=0;$i<$num;++$i){echo $arr[$i].'<br />';}?>注释:上例代码中我们先计算出数组arr中元素的个数,然后才使用在for语句,这样做很高效的。因为如果是for(arr中元素的个数,然后才使用在for语句,这样做很高效的。因为如原创 2020-09-10 10:04:37 · 159 阅读 · 0 评论 -
php字符串方法
PHP 5 String 函数PHP 字符串函数是 PHP 核心的组成部分。无需安装即可使用这些函数。函数 描述addcslashes() 返回在指定的字符前添加反斜杠的字符串。addslashes() 返回在预定义的字符前添加反斜杠的字符串。bin2hex() 把 ASCII 字符的字符串转换为十六进制值。chop() 删除字符串右侧的空白字符或其他字符。chr() 从指定的 ASCII 值返回字符。chunk_split() 把字符串分割为一系列更小的部分。convert_cyr_s原创 2020-09-09 18:53:51 · 106 阅读 · 0 评论 -
PHP怎么写登录和注册页面 -CMS系统
登陆界面 login.php<form action="logincheck.php" method="post"> 用户名:<input type="text" name="username"> <br/> 密码:<input type="password" name="password"> <br/> <input type="submit" name="submit" value="登录"> <a原创 2020-09-09 18:31:39 · 466 阅读 · 0 评论 -
php 授权登录
根据文档说明,网页授权流程分为四步。这里主要说下其中的三步, 第一步:用户同意授权,获取code。 首先是要有一个认证的微信公众号,进入 公众号设置/功能设置/网页授权域名,填入授权回调接口域名。 前端页面js代原创 2020-09-09 14:05:10 · 837 阅读 · 0 评论 -
php 环境搭建
1.wanmp+Apache 搭建(下次介绍)2.宝塔下载宝塔:https://www.bt.cn/download/windows.html创建一个文件夹 例如 www宝塔创建网站配置文件:C:\Windows\System32\drivers\etc\hosthttp://php_student.com/ 打开出现以下就环境就好了...原创 2020-09-07 09:59:38 · 124 阅读 · 0 评论