随笔分类 -  php

摘要:<?phpfunction test($key){ static $array = array(); /* */ $array[]=$key; var_dump($array);} test(1);test(2); 输出: array(1) { [0]=> int(1)}array(2) { [0] 阅读全文
posted @ 2016-09-28 11:35 maxomnis 阅读(263) 评论(0) 推荐(0)
摘要:Windows Windows Windows Windows Globally installing the PHAR involves the same procedure as manually installing Composer on Windows: Create a director 阅读全文
posted @ 2016-06-23 17:06 maxomnis 阅读(145) 评论(0) 推荐(0)
摘要:本地主机(Windows环境192.168.66.1)访问虚拟机(192.168.66.139)里面的搭建的php环境(系统centos6.5版本,php版本是5.5.30 ,xdebug 2.4.0),通过命令行pecl install xdebug安装的xdebug, 在php.ini配置xde 阅读全文
posted @ 2016-06-16 17:15 maxomnis 阅读(6732) 评论(0) 推荐(0)
摘要:<?php // page1.php session_start(); echo 'Welcome to page #1'; $_SESSION['favcolor'] = 'green'; $_SESSION['animal'] = 'cat'; $_SESSION['time'] = time( 阅读全文
posted @ 2016-06-14 17:39 maxomnis 阅读(175) 评论(0) 推荐(0)
摘要:www.maxomnis.com的index.php文件内容 <?phpsession_start();setcookie("user", "alex proter", time()+3600,'/home','maxomnis.com');setcookie("age", "1000000000" 阅读全文
posted @ 2016-06-01 11:38 maxomnis 阅读(3399) 评论(0) 推荐(0)
摘要:CGI,FastCGI都是一套接口标准;是编程语言(比如php,python; python里面也有wsgi)与web服务器(比如Nginx)的通信标准(比如你跟老外交流,那么FastCGI就相当于是英语了); PHP-FPM是FastCGI的进程管理器 FastCGI是从传统的CGI发展过来的,传 阅读全文
posted @ 2016-05-26 07:55 maxomnis 阅读(215) 评论(0) 推荐(0)
摘要:不同的域名生成的session_id是不一样的,(就算是相同的主域,例如:www.test.com, blog.test.com 都不一样); 相同的主域,不同的二级域名,例如www和blog都是不共享cookie的,要如何共享呢? setcookie("age", "1000000000", ti 阅读全文
posted @ 2016-05-21 20:45 maxomnis 阅读(134) 评论(0) 推荐(0)
摘要:cd /data/php-5.5.35/ext/mysqli 找到安装包目录下面的ext目录 ./configure --with-php-config=/usr/local/php5/bin/php-config //指定php5的环境 阅读全文
posted @ 2016-05-19 11:07 maxomnis 阅读(231) 评论(0) 推荐(0)
摘要:单引号里面的内容是直接被当做一个字符串,用双引号定义的字符串的内容最只要的特征就是会被解析。 阅读全文
posted @ 2016-05-08 12:39 maxomnis 阅读(144) 评论(0) 推荐(0)
摘要:为什么使用phpize? 比如刚开始安装的时候使用 ./configure --prefix=/usr/local/php7 --exec-prefix=/usr/local/php7 --bindir=/usr/local/php7/bin --sbindir=/usr/local/php7/sb 阅读全文
posted @ 2016-05-02 20:24 maxomnis 阅读(362) 评论(0) 推荐(0)
摘要:extension = seaslog.so seaslog.default_basepath = /log/seaslog-test ;默认log根目录 seaslog.default_logger = default ;默认logger目录 seaslog.disting_type = 1 ;是 阅读全文
posted @ 2016-05-02 19:31 maxomnis 阅读(1513) 评论(0) 推荐(0)
摘要:PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,基于php代码的,安装目录在/usr/local/php7/lib/php PECL 是“PHP Extension Communi 阅读全文
posted @ 2016-05-02 19:27 maxomnis 阅读(230) 评论(0) 推荐(0)
摘要:PEAR安装 linux下只要你安装的是PHP 4.3.0以上的版本,默认安装都是支持PEAR的,除非你使用了”--WITHOUT-PEAR”选项,修改PHP.INI文件,在INCLUDE_PATH部分添加pear包目录,以确保php中用include能找到文件。PHP目录下会有/bin/pear, 阅读全文
posted @ 2016-05-02 18:41 maxomnis 阅读(983) 评论(0) 推荐(0)
摘要:Configuration File (php.ini) Path /usr/local/php7/etc 这个目录下面也有php.ini文件(如果在编译./configure -with-config-file-path=/usr/local/php7/etc 指定了该参数的话) ,php-fpm 阅读全文
posted @ 2016-05-02 18:02 maxomnis 阅读(2045) 评论(1) 推荐(0)
摘要:默认情况下nginx是会显示php的报错的,如果要关闭报错显示,需要在/usr/local/php7/etc/php-fpm.d/www.conf文件里面设置,貌似默认情况下在php.ini关闭没效果, 如下设置就可以了: 如果没有生效,查看下phpinfo()输出的结果中,display_erro 阅读全文
posted @ 2016-05-01 01:53 maxomnis 阅读(689) 评论(0) 推荐(0)
摘要:### Editing ### `Ctrl + Space` 基本代码完成(任意类的,方法的或者变量的名称) `Ctrl + Shift + Enter` 补全当前语句 `Ctrl + P` Parameter info (within method call arguments) `Ctrl + 阅读全文
posted @ 2016-04-21 14:57 maxomnis 阅读(335) 评论(0) 推荐(0)
摘要:1 var; 10 } 11 } 12 13 14 15 $instance = new SimpleClass(); 16 17 $assigned = $instance; 18 $reference =& $instance; 19 20 $assigned->var = "aaaaaaa"; 21 22 $assigned = null; 23 24 v... 阅读全文
posted @ 2016-04-14 17:34 maxomnis 阅读(178) 评论(0) 推荐(0)