$_POST["test"];$_GET["test"]; 原文:http://www.cnblogs.com/cb168/p/5060571.html
在phpcmsv9的目录中找到phpcms/libs/classes/form.class.php文件找到这几行代码<span style="font-size:18px;">// $str = '<script type="text/javascript" src="'.JS_PATH.'ckeditor/ckeditor.js"></script>';// define('EDITOR_INIT', 1); }</span>将其替换为<span style="font-size:18px;">$str = '<script type="text/javascript" src="'.JS_PATH.'ueditor/ueditor.config.js"></script>';$str .= '<script type="text/javas...
忘记在哪里获取的函数了,刚才不了心在一个包里面找到,临时保存起来/** * 是否移动端访问访问 * * @return bool */ function isMobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset ($_SERVER[‘HTTP_X_WAP_PROFILE‘])) { return true; } // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息 if (isset ($_SERVER[‘HTTP_VIA‘])) { // 找不到为f...
publicfunction encrypt($str){//$str = "hh";$key = "key:123";//密钥$cipher = MCRYPT_DES;$models = MCRYPT_MODE_ECB;$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher,$models),MCRYPT_RAND);//加密$str_encrypt = mcrypt_encrypt($cipher,$key,$str,$models,$iv);return$str_encrypt;}publicfunction decrypt($str_encrypt){$key = "key:123";//密钥$cipher = MCRYPT_DES;$models = MCRYPT_MODE_ECB;$iv = mcrypt_create_i...
适用环境: 64位Linux下载地址(18MB): http://pan.baidu.com/s/1ntsrU8x md5sum php-7.0.0-dev-20150502.tar.xz5a4897aedc5ccf02da1f0340ac6013cbPHP版本是7.0.0开发版,2015年5月2日从Github下载的代码.https://github.com/php/php-src/archive/master.zip创建用户:sudo groupadd -r pngsudo useradd -r -g png -s /usr/sbin/nologin -d /png/nonexistent -c "png user" png创建目录设置权限并解压:sudo mkdir /png && sudo chown ...
PHP 扩展是对 PHP 功能的一个补充,编写完 PHP 扩展以后, ZEND 引擎需要获取到 PHP 扩展的信息,比如 phpinfo() 函数是如何列出 PHP 扩展的信息,PHP 扩展中的函数如何提供给 PHP 程序员使用,这些是开发 PHP 扩展需要了解的内容。 这些内容并不复杂,在开发 PHP 扩展时只要愿意去了解一下相关的部分就可以了,在这里,我给出一个简单的介绍。 PHP 扩展中负责提供信息的结构体为 zend_module_entry,该结构体的定...
本文实例讲述了php输入数据统一类。分享给大家供大家参考。具体如下: <?php class cls_request{private $getdata;//存储get的数据private $postdata;//存储post的数据private $requestdata;//存储request的数据private $filedata;//存储file的数据private $cookiedata;//存储cookistatic $_instance;//本类的实例private function __construct(){$this->getdata = self::format_data($_GET);$this->postdata = self::format_data(...
本文实例讲述了ThinkPHP中Session用法。分享给大家供大家参考。具体如下:在ThinkPHP封装了Session类,用户可以直接使用,常用的方法有:Session::set(name, value):注册 session 。Session::is_set(name):检查Session的值是否设置。Session::get(name):读取 session 。Session::clear():清空Session。Session::destroy():销毁 session 。ThinkPHP 默认开启了 session 会话,因此在使用 Session 类之前不需要使用 session_start()...
wget http://pecl.php.net/get/APC-3.1.9.tgztar xzvf APC-3.1.9.tgzcd APC-3.1.9/usr/local/php/bin/phpize./configure --enable-apc-mmap --enable-apc --enable-apc-filehits --with-php-config=/usr/local/php/bin/php-config --prefix=/usr/local/apcmakemake installextension = apc.soapc.enabled = 1apc.cache_by_default = onapc.shm_segments = 1apc.shm_size = 160apc.ttl = 7200apc.user_ttl = 7200apc.num_files_hint...
简单说,调试报错了,Call to undefined function curl_init()。度了下,大家都说这样可以搞定(WAMP环境):1、在php.ini中找到extension=php_curl.dll,去掉前面的,php.ini一般在c:\windows下面。2、在php.ini中找到extension_dir = "ext",去掉前面的;,改为extension_dir = "C:\php5\ext"。"C:\php5\ext"只是示例,即扩展指向的路径要对3、php_curl.dll(???)、libeay32.dll、ssleay32.dll、php5ts.dll都拷到system32下面...
//三角形function sanjiaoxing(){for($i=0;$i<6;$i++){for($j=0;$j<=$i;$j++){echo "*";}echo "<br>";}}sanjiaoxing(); //三角形例二for($i=1;$i<=10;$i++){for($x=1;$x<=10-$i;$x++){echo " ";}for($j=1;$j<=$i;$j++){echo " *";}echo "<br>";} //杨辉三角function yanghui($n){for($i=0;$i<$n;$i++){$arr[$i][0]=1;$arr[$i][$i]=1;}for($i=2;$i<$n;$i++){for($j=1;$j<$i;$j++){$arr[$i][$j]=$arr[$i-1][$i-1]+$arr[$i-1]...
$select_re_id=$cnx->query("select count(*) c from Yid where pid=‘".$pid."‘ and gid=‘".$gid."‘ and prid=‘".$prid."‘ and cid=‘".$cid."‘ and did=‘".$did."‘");//判定是否为空foreach($select_re_idas$reid){ if ($reid[‘c‘]==‘0‘){ $cnx->query("INSERT INTO Yid (pid,gid,prid,cid,did) VALUES (‘".$pid."‘,‘".$gid."‘,‘".$prid."‘,‘".$cid."‘,‘".$did."‘)");//添加语句 }else{ echo "此组合已经存...
PHP 面向对象中常见关键字的使用: 1、final :final关键字可以加在类或者类中方法之前,但是不能使用final标识成员属性。 作用: 使用final标识的类,不能被继承。 在类中使用final标识的成员方法,在子类中不能覆盖。 总结:final表示为最终的意思,所以使用final关键字的类或者类中的成员方法是不能被更改的。 2、static :static关键字将类中的成员属性或者成员方法标识为静态的,static标...
Apache配置需要安装:VC2015 httpd-2.4.16-win32-VC14.zip VC14就是2015的环境。 又比如:php-5.6.12-Win32-VC11-x86 VC11就是2012的环境。 如果没有安装对应的环境,在配置php + apache时,提示内容会很奇怪。 可能会提示"提示NET HELPMSG 3547"在 语句填写正确的情况下,VC环境也是造成其原因之一,切记。 将Apache解压到C:\www\Apache24\,进入C:\www\Apache24\binhttpd.exe -k install -n "Apache24" rem httpd.exe -k uninsta...
$string = ‘April 15, 2003‘;$pattern = ‘/(\w+) (\d+), (\d+)/i‘;$replacement = ‘${1}1,\3‘;//$replacement = ‘${1}1,$3‘;//$replacement = ‘${1}1,{3}‘;echo preg_replace($pattern, $replacement, $string);echo ‘<br/>‘;//-----------------------------$string = ‘The quick brown fox jumped over the lazy dog.‘;$patterns = array();$patterns[0] = ‘/quick/‘;$patterns[1] = ‘/brown/‘;$patterns[2] =...