die("")是什么用的?你门跟数据库通信是采用pear db方式还是具体库函数

chendd2003 2004-01-14 10:45:45
die("")是什么用的?你门跟数据库通信是采用pear db方式还是具体库函数
...全文
31 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
eok 2004-01-31
  • 打赏
  • 举报
回复
我不习惯用PEAR,一般数据库不会轻易更换,虽使代码的转移变得方便,但是是以牺牲运行效率为代价的,我个人还是喜欢用数据库本身的函数。
hope1983 2004-01-15
  • 打赏
  • 举报
回复
pear

mysql_query("CREATE TABLE $strTableNameMsg(......) or die(mysql_error())
不会显示错误
feel8 2004-01-15
  • 打赏
  • 举报
回复
die跟exit一样

exit
(PHP 3, PHP 4 )

exit -- Output a message and terminate the current script
Description
void exit ( [string status])

void exit ( int status)


注: This is not a real function, but a language construct.

注: PHP version >= 4.2.0 does NOT print the status if it is an integer.

The exit() function terminates execution of the script. It prints status just before exiting.

If status is an integer, that value will also be used as the exit status. Exit statuses should be in the range 1 to 254, the exit status 255 is reserved by PHP and shall not be used.

例子 1. exit() example

<?php

$filename = '/path/to/data-file';
$file = fopen ($filename, 'r')
or exit("unable to open file ($filename)");

?>




注: The die() function is an alias for exit().
xucarry 2004-01-15
  • 打赏
  • 举报
回复
我也有pear挺好的
pwtitle 2004-01-14
  • 打赏
  • 举报
回复
我用Pear
die楼上已经说过
伍子V5 2004-01-14
  • 打赏
  • 举报
回复
终止运行,并返回一个字符串

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧