ITeye博客

php

共 4 篇文章

discuz 单点登录的另一种方法

discuz 单点登录 其他人做法 还真不清楚 当初我的第一个方案是模拟登录 保存cookie信息,但失败了 具体问题也就没看了 第二方法也就是很简单的方法了 直接隐藏表单提交 如果有自己服务器的朋友 可以使用 memcache 来做 那样会更方便点 比如在memcache保存 用户名和密码 当在java 或 php 等连接到discuz前 先进入到这个php(比如:login) 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml…

2010-01-31 21:02 · php

java php DES 加密解密

import java.io.IOException; import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class DES { private byte[] desKey…

2009-12-29 10:47 · php

关于解决"cannot modify header information - headers already sent by"的错误

1在页面顶部的php标签中加入ob_start(); 2在返回的信息下面加入ob_end_flush(); 这样就可以屏蔽错误信息的现实了 另外转一下其他人的方法,也许在其他情况下也会有效 If you got this message: "Warning: Cannot modify header information - headers already sent by ...." 如果在执行php程序时看到这条警告:"Warning: Cannot modify header information - headers already sent by ...." Few notes b…

2009-11-28 22:56 · php

php smarty基本使用

1.基本类 //smarty_config.php <?php define('TEMPLATE_DIR','templates/'); define('COMPILE_DIR','templates_c/'); define('CONFIG_DIR','configs/'); define('CACHE_DIR','cache/'); ?> //View.class.php <?php //配置文件 require_once 'configs/smart_config.php'; //Smarty类 require('smarty/Smarty.class.php'); class Vie…

2009-10-21 20:56 · php