-
使用PHP连接数据库_实现用户数据的增删改查的整
[PHP教程] 2021-03-06 15:40:15 53人阅读
main页面(主页面) ?php $db = new MySQLi("localhost","root","","mydb"); if(mysqli_connect_error()){ die("连接失败"); } $sql = "select * from Info"; $result = $db-query($sql); $attr = $result-fetch_all()...[详细]
-
PHP实现字节数Byte转换为KB、MB、GB、TB的方法
[PHP教程] 2021-03-06 15:40:15 106人阅读
本篇章节讲解PHP实现字节数Byte转换为KB、MB、GB、TB的方法。供大家参考研究具体如下: 前面介绍了 ,这里改用PHP实现这一功能。代码非常简单: 0 $num =1024 $num =pow(1024,2) $num =pow(1024,3) $num =pow(1024,4...[详细]
-
PHP下 Mongodb 连接远程数据库的实例代码
[PHP教程] 2021-03-06 15:40:15 128人阅读
WINDOWS 下装MongoDB 先去官网下载 :https://www.mongodb.com/download-center#atlas 1、在mongodb的文件夹下创建 data、logs 文件夹 和mongo.conf 命令行命令! mongod --dbpath D:\mongodb\data --logpath=D:\mon...[详细]
-
php注册系统和使用Xajax即时验证用户名是否被占
[PHP教程] 2021-03-06 15:40:15 72人阅读
在php中使用Xajax能够即时与数据库发生交互 带给用户更好的体验 主要的应用有网页的即时、不刷新的登录系统 也可以利用于注册系统中 即时验证用户名是否被占用 一、基本目标 首先在mysql中有一张用户信息表user 编写...[详细]
-
php插件Xajax使用方法详解
[PHP教程] 2021-03-06 15:40:15 148人阅读
Xajax是PHP一个不用刷新或者跳到其他页面,就能通过点击组件等与后台后台数据库交互的技术 Xajax是php的一个插件,要想使用Xajax就必须先到其官网中下载一个压缩包,由于国外的网速慢,我也给大家上传了一个(点击打...[详细]
-
PHP文字转图片功能原理与实现方法分析
[PHP教程] 2021-03-06 15:40:15 164人阅读
本篇章节讲解PHP文字转图片功能。供大家参考研究具体如下: 这项功能主要用于对邮箱地址、手机等可能被网络爬虫抓取的重要信息的处理。将文字转化为图片绝对是个好注意。验证码的基本生成原理也与此差不多,只是对再...[详细]
-
php数据库的增删改查 php与javascript之间的交
[PHP教程] 2021-03-06 15:40:15 169人阅读
使用语言操作数据库是重中之重,如果一门语言你不懂得如何操作数据库,那么你还是没有学会这门语言。 PHP操作数据库的方法并不难同时php的值还可以与JavaScript脚本之间进行控制 一般是php的值传递到javascript中,...[详细]
-
PHP获取数组表示的路径方法分析【数组转字符串
[PHP教程] 2021-03-06 15:40:13 139人阅读
本篇章节讲解PHP获取数组表示的路径方法。供大家参考研究具体如下: 问题: 文件解析过程中发现一段路径用数组的形式存储,现需要将完整路径以字符串形式输出 解决方法: $v){ $pathstr.=$v.'/';}$pathstr=substr($p...[详细]
-
浅谈关于PHP解决图片无损压缩的问题
[PHP教程] 2021-03-06 15:37:13 152人阅读
本文介绍了关于PHP解决图片无损压缩的问题,分享给大家,具体如下: 代码如下: 我发现用php的imagecopyresized把大图片缩成小图片时,图片会变得很模糊,这时候要提升清晰度不如用 imagecopyresampled 代替 imageco...[详细]
-
phpStudy配置多站点多域名和多端口的方法
[PHP教程] 2021-03-06 15:37:13 130人阅读
本文介绍了phpStudy配置多站点多域名和多端口的方法,分享给大家,也给自己留个笔记 WWW目录下有三个项目目录: a b c Apache 默认httpd端口为 80,网站目录为D:\WWW\a 1.配置多域名多站点 第一步:点击“其他选项菜...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]