凡是与session有关的,之前必须调用函数session_start();为session付值很简单,如:
<?phpSession_start();$Name = "这是一个Session例子";Session_Register("Name");//注意,不要写成:Session_Register("[color=red]$Name[/color]");Echo $_SESSION["Name"];//之后$...
凡是与session有关的,之前必须调用函数session_start();为session付值很简单,如:
<?phpSession_start();$Name = "这是一个Session例子";Session_Register("Name");//注意,不要写成:Session_Register("[color=red]$Name[/color]");Echo $_SESSION["Name"];//之后$...
1. 开启防火墙端口:/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 22822 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 2121 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT/etc/rc.d/init.d/iptables save/etc/init.d/iptables restart查看...
function delhtml($content){ $content = eregi_replace("<html>.+</head>","", $content); $content = preg_replace("/<.+?>/i","", $content); return $content; } $oneurl = "http://www.chenapp.com"; $content = file_get_contents($oneurl); echo delhtml($content);
冒泡排序(数组排序)
centos下php不会默认安装json扩展的。 而且也不能通过yum进行安装。
下载源文件包:wget http://www.aurore.net/projects/php-json/php-json-ext-1.2.1.tar.bz2解压tar xvjf php-json-ext-1.2.0.tar.bz2进入目录cd php-json-ext-1.2.0初始化PHP环境phpize报错了:phpize commend not foundPHP JSON安装之前需...