
php
微个日光日
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用PHP和AJAX制作日历
在很多网站,日历是一个必要的组成部分。通常这些日历是jquery的一个插件,但是也可以用php来实现。今天我将使用ajax技术展示一个月份的日历,可以通过左右箭头切换月份。由于是ajax,这个日历还有其他的优点,它是一个响应式的移动日历。在开始编写代码之前,我建议你先看看我们的demo.在线演示 下载源文件文件结构:在开始之前,让我们先为我们的文件定义一个清晰的翻译 2014-04-09 15:51:17 · 3516 阅读 · 0 评论 -
phpMyAdmin的安装
今天手贱重新安装了xammp,为了快点安装完,把原创 2014-07-08 23:38:11 · 1021 阅读 · 1 评论 -
PHP读取目录下所有文件,并通过ajax返回json格式的数据
<?php $dir = "file"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) {原创 2014-08-10 18:07:13 · 3858 阅读 · 1 评论 -
How to Upload Large Files in PHP
Uploading a file from a web form in PHP is easy. The online manual provides a Handling File Uploads section, and there are several articles on sitepoint.com, including How To Handle File Uploads Wit转载 2014-08-27 15:39:47 · 1158 阅读 · 0 评论 -
php对xml进行简单的增删改查(CRUD)操作
假如有下面xml文件: setting1 value setting2 value setting3 value .... .... ....如何使用php对它进行CRUD?其实像这种简单的xml文件使用SimpleXMl再好不过了。你可以像这样来操作它:// CREATE$config = new SimpleXmlEleme原创 2014-08-28 09:37:01 · 3940 阅读 · 0 评论 -
在mac中使用brew安装nginx步骤及相关问题
1.使用brew安装nginx brew install nginx 如果报如下错误: Error: Permission denied - /usr/local/var那可能是你当前的用户无权限对/usr/local/文件夹进行读写操作,执行如下命令获取权限 sudo chown -R 'your name' /usr/local2.安装完...原创 2016-08-14 19:43:44 · 16013 阅读 · 0 评论 -
在PHP服务中开启GD模块设置
转载请注明出处: http://xiebaochun.github.io/blog/posts/2017/06/05/enabling_the_gb_library_in_php_setting.html在PHP服务中,很多功能都需要启用GD库来实现。比如你需要GD库在网站的某些地方来显示图形验证码。PHP默认安装,是已经启用了GD库的。如果你的PHP服务并没有启用GD库,下面就介绍一下如何来启用原创 2017-06-05 16:15:50 · 9851 阅读 · 0 评论 -
mac 安装php
1.下载并安装iconviconv函数库能够完成各种字符集间的转换,是php编程中不可缺少的基础函数库。 1、下载libiconv函数库https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz2、解压缩tar -zxvf libiconv-1.15.tar.gz; 3、安装libiconv #./config原创 2017-06-02 11:32:33 · 1055 阅读 · 0 评论 -
centos系统yum安装php7.0
1、更新yum源centos7:rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmcentos6:rpm -Uvh https://dl.f...原创 2018-11-12 14:43:13 · 1139 阅读 · 0 评论 -
Centos7安装php-redis扩展
想要在php中操作redis,那就必须安装php-redis扩展,就比如MySQL一样,php想要操作mysql数据库的话,就必须安装mysql扩展,只是在php安装中就默认安装了mysql扩展了。步骤一:下载解压下载:https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz 我们把源码包放在一个具体的目录下是一个好习惯,...原创 2018-11-12 14:46:39 · 432 阅读 · 0 评论 -
thinkPHP之微理解
1、支持win和unix服务器环境,遵循Apache2开源协议。2、借鉴struct架构,MVC设计模式等3.几个重要概念: Dao:DataAccessObject(数据访问对象) VO对象:ValueObject(数据对象,或者是业务对象) VoList对象:ThinkPHP数据操作的基本元素。4、分层架构:原创 2014-07-08 23:08:00 · 1026 阅读 · 0 评论 -
phpmyadmin出现空密码登录被禁止
在Windows或者Linux下mysql安装后默认的密码为空,又当我们又安装了mysql的管理工具 phpmyadmin后登陆时出现“空密码登陆呗禁止(参见允许密码为空)”。不能登录成功解决办法如下:1..要是你想用空密码,则将phpmyadmin下的config.inc.php(根目录)或者config.default.php(根目录)再则:libraries\config.default.p原创 2014-07-09 09:26:26 · 1831 阅读 · 0 评论 -
Thinkphp学习日记:jQuery_ajax数据提交
最近在玩Thinkphp,废话不多说,说正事.客户端js提交代码1 $.post('http://localhost/app/index.php/Index/Index/handle',{username : document.getElementById('username').value,content : document.getElementById('content').原创 2014-07-06 22:24:56 · 8787 阅读 · 1 评论 -
php入门微理解
1、php是什么?(来自百度百科) php:Hypertext preprocessor(超文本预处理器)、一种开源脚本语言、主要用于web开发。2、与其他语言的关系 介于HTML和C/C++,Java,C#等语言之间、通常需要相应脚本解释器才能运行。3、工作原理 通过web服务器(IIS or Apache)和php引擎程序解释执原创 2014-05-25 12:40:02 · 1531 阅读 · 0 评论 -
php之str_replace详解
str_replace(PHP 4, PHP 5)str_replace — Replace all occurrences of the search string with the replacement stringDescriptionmixed str_replace ( mixed $search , mixed $replace , mixed $原创 2014-07-05 22:18:33 · 2282 阅读 · 0 评论 -
php之substr()详解
定义和用法substr() 函数返回字符串的一部分。语法substr(string,start,length)参数描述string必需。规定要返回其中一部分的字符串。start必需。规定在字符串的何处开始。正数 - 在字符串的指定位置开始负数 - 在从字符串结尾的指定位置开始0 - 在字符串中的转载 2014-07-05 22:31:24 · 967 阅读 · 0 评论 -
php之foreach遍历数组
foreach(PHP 4, PHP 5)The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to use it on a variable w原创 2014-07-05 22:12:02 · 2141 阅读 · 0 评论 -
使用sublime text2如何新建文件快速生成HTML头部信息?
html xmlns="http://www.w3.org/1999/xhtml">head>meta http-equiv="Content-Type" content="text/html; charset=utf-8" />title>无标题文档title>head>body>body>html>我知道,如果安装有zen coding插件,那就可以ctrl+alt+shi原创 2014-07-06 12:49:30 · 17302 阅读 · 0 评论 -
php之preg_replace详解
preg_replace(PHP 4, PHP 5)preg_replace — Perform a regular expression search and replaceDescriptionmixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $l原创 2014-07-05 22:04:19 · 2966 阅读 · 0 评论 -
php之unset()详解
unset(PHP 4, PHP 5)unset — 释放给定的变量说明void unset ( mixed $var [, mixed $... ] )unset() 销毁指定的变量。unset() 在函数中的行为会依赖于想要销毁的变量的类型而有所不同。如果在函数中 unset() 一个全局变量,则只是局部变量被销毁,而在调用环境中的变量将保持原创 2014-07-05 22:25:24 · 1012 阅读 · 0 评论 -
php中的include和require的区别
主要关注红色标记语句即可。The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement.Including files is原创 2014-07-05 21:26:41 · 3168 阅读 · 0 评论 -
php之内存管理基础
用 C 语言编程时,开发者要手工地进行内存管理。因为 PHP 经常用作 Web 服务器的模块,内存管理与预防内存泄漏紧密关联。此外要知道 PHP 可能用于线程环境中,这意味着全局变量可能导致竞争状况。有关线程内全局数据处理的信息请参见作为线程隔离设施的 线程安全的资源管理器。此外,Zend 引擎要面对一个十分特殊的使用模式:在一段比较短的时间内,许多 zval 结构大小的内存块和其他的小内原创 2014-07-05 22:29:31 · 783 阅读 · 0 评论 -
CentOS7上安装并配置Nginx、PHP、MySql
一、Nginx 1、安装nginxyum install nginx2、启动nginxsystemctl start nginx除了systemctl start nginx之外,常用的相关命令还有systemctl stop nginx、systemctl restart nginx、systemctl status nginx3、测试nginx是否安装成功 ...原创 2018-11-12 14:55:23 · 508 阅读 · 0 评论