易截截图软件、单文件、免安装、纯绿色、仅160KB

php调用存储过程

例子程序。
<?php
    define('CLIENT_MULTI_RESULTS', 131072);
    $link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
    mysql_select_db("vs") or die("Could not select database");
?>
        <?php
        $result = mysql_query("call get_news_from_class_id(2)") or die("Query failed:" .mysql_error());
        while($row = mysql_fetch_array($result, MYSQL_ASSOC))
        {
                $line = '<tr><td><a target = _blank href=\''.$row["url"].'\'>'.$row["title"].'('.$row["page_time"].')'.'</a></td></t
r>';
                echo $line;
                printf("\n");
        }
        mysql_free_result($result);
        ?>
<?php
    mysql_close($link);
?>


相关文档:

判断php变量是否定义,是否为空

isset() 【1】
Returns TRUE if var
exists and has value other
than NULL, FALSE otherwise.
输入可以是多个变量,只有所有的变量为真的时候,返回真
empty()【2】
Returns FALSE if var
has a non-empty
and non-zero value.

The following things are considered to be empty:

"" (an em ......

PHP安装程序制作

<?php
header("Content-type:text/html;charset=gb2312"); //看你用的是什么编码,要保持一致。
$files="config.php"; //要写入的配置文件。
if(!is_writable($files)){ //判断是否有可写的权限,linux操作系统要注意这一点,windows不必注意。
echo "<font color=red>文件不可写</font>";
......

PHP 环境变量

在PHP网站开发中,为了满足网站的需要,时常需要对PHP环境变量进行设置和应用,在虚拟主机环境下,有时我们更需要通过PHP环境变量操作函数来对PHP环境变量值进行设置。为此我们有必要对PHP环境变量先有所熟悉。今天和大家分享PHP环境变量$_SERVER和PHP系统常量的部分详细说明。
  PHP环境变量主要有$GLOBALS[]、$_SERVER ......

一个简陋的支持HTTPS的PHP CURL封装函数

标题有点长,其实就是用来向https服务器post数据
function curlPost($url, $data, $timeout = 30)
{
$ssl = substr($url, 0, 8) == "https://" ? TRUE : FALSE;
$ch = curl_init();
$opt = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号