【php不报错怎么解决】教程文章相关的互联网学习教程文章

php建表不成功,但也没有报错,求解解决办法

php建表不成功,但也没有报错,求解PHP code页面显示:“没有表”,但执行一次后应该创建表了,我再刷新页面还是显示“没有表”,请各位大虾们帮忙看下神马问题?------解决方案-------------------- 试试:PHP code//连接数据$con=mysql_connect("localhost","root","welcome123") or die("无法连接数据库".mysql_error());//判断是否有my_project数据库$existDB=mysql_select_db("my_project",$con);//echo "没有my_project数据库...

关于namespace和use的报错,该怎么处理

关于 namespace 和 use的报错PHP codePHP codeShow(); ?>这里有报错了。Fatal error: Class 'myNamespace' not found in /var/www/HelloWorld/index.php on line 4用明明空间的方式引用不是这样写的?------解决方案-------------------- $c1 = new myNamespace\MyClass();可以的 ------解决方案-------------------- $c1= new myNamespace\MyClass(); 参考http://jackyrong.iteye.com/blog/900964

为什么javascript的报错没什么用解决方法

为什么javascript的报错没什么用要崩溃了,为什么javascript的报错没什么用?include("conn.php");if(isset($_POST["submit"])){ $sql="INSERT INTO message (id,user,title,content,lastdate) " . "values ('','$_POST[user]','$_POST[title]','$_POST[content]',now())"; //echo $sql; $result = mysql_query($sql,$conn)or die(mysql_error());}?> ------解决方案-------------------- if (document.myform.u...

使用$smarty->register_object报错解决方案

使用 $smarty->register_object 报错本人phprequire("libs/Smarty.class.php");$smarty = new Smarty;$smarty->template_dir = "templates";$smarty->cache_dir = "cache";$smarty->config_dir = "configs";$smarty->compile_dir = "templates_c";class My_Object{ function meth1($params, &$smarty_obj) { return "this is my meth1"; }}$myobj = new My_Object;// registering the object (will be by reference)$smarty->re...

熟悉正则的进来下,0宽断言中使用重复*会报错解决办法

熟悉正则的进来下,0宽断言中使用重复*会报错大家看看这两个。PHP code preg_match(#(?<=a*)word#, pre word,$mt); preg_match(#(?<=<(\w+)>).*(?=<\/\1>)#, prehi! word,$mt); ------解决方案-------------------- http://perldoc.perl.org/perlretut.html#Looking-ahead-and-looking-behind这是perl的正则文档,觉得应该可以适用php的正则引擎里面有一句 The lookahead assertion is denoted by (?=regexp) and the lookbehind a...

php进行sqlserver操作报错解决办法

php进行sql server操作报错php对sql server 2000进行操作sql语句是:insert into someTable values('1111111','222222','33333333333','1100100',4,'5100005','盘尼西林','01','0.125g*20','口服常释剂型',16,1,16,0,0,'0','1','2012-05-07','YP','11','盒',16,0,0,0,'01','01',16,0,0,'ZL001','2012-5-7','/','/','/')在sql sever2000的sql查询分析器执行没问题,但在php中执行报错,代码如下:PHP code报错如下:link db success...

die()函数如何不报错

die()函数怎么不报错if(!file_exists("welcome.txt")){die("file not found");}else{$file = fopen("welcome.txt","r");}理论上文件不存在,浏览器应该输出这样的错误消息:file not found可为什么我的浏览器什么也没有输出?------解决方案-------------------- 探讨为什么不存在也没有报错?

php正则表达式报错,【图】

php 正则表达式报错,高手请进。$str = preg_replace("/(?]*)(茶叶)(?!\"|)/sui", '茶叶', $str, 5); 报错如下:Warning: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 10 in D:\AppServ\www\Template\test.php on line 28------解决方案-------------------- 试试PHP code$html = <<<html 这儿是茶叶的链接。中国茶叶 这儿是中国茶叶大观的链接。 这儿是茶...

smartyconfig_load和自定义函数报错解决方法

smarty config_load 和 自定义函数 报错temp.tplHTML code {config_load file="../configs/a.conf"} {#s#} a.confHTML code s=测试测试 报错Fatal error: Uncaught exception 'SmartyException' with message 'Unable to read config file '../configs/a.conf'' in C:\wamp\www\smarty\libs\sysplugins\smarty_internal_resource_file.php:68 Stack trace: #0 C:\wamp\www\smarty\libs\sysplugins\smarty_config_source.php(86): S...

natsort()排列json数据时报错。解决方法

natsort()排列json数据时报错。PHP code $json = [{"name":"a1"},{"name":"a10"},{"name":"a12"},{"name":"a3"},{"name":"a5"},{"name":"b21"},{"name":"b2"},{"name":"b11"}]; natsort($json); $data = json_decode($json); foreach ($data as $row) {echo $row->name.;// } 为什么会提示 Warning: natsort() expects parameter 1 to be array, string given in d:\www\test.php?另外natsort()和strnatcmp()的区别在哪里?谢谢。-...

关于php使用system()开启linux下的firefox,报错:Error:nodisplayspecified,该如何处理

关于php使用system()开启linux下的firefox,报错:Error:no display specified求各位大侠帮助?------解决方案--------------------是否有操作权限?代码呢? ------解决方案-------------------- 浏览器访问和终端下的访问是两个权限。浏览器中是普通用户权限,你在机子上装sudo#查询sudo版本apt-cache search sudo #安装sudoapt-get install sudo然后:system("sudo firefox http://www.baidu.com"); //切换至root权限 ------解...

配置Win2003+IIS6.0+PHP5.3+FastCgi报错,该怎么解决

配置Win2003+IIS 6.0+PHP 5.3+FastCgi报错新手,配置Win2003+IIS 6.0+PHP 5.3+FastCgi时,总是报以下错误:FastCGI ErrorThe FastCGI Handler was unable to process the request. --------------------------------------------Error Details:Error Number: 14001 (0x800736b1). Error Description:由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题HTTP Error 500 - Server Error.Internet Informat...

.php报错急

在线等. php报错 急急急朋友一个网站叫我加点功能, 我把php, 跟mysql部署到本地apache下面, 访问index.htm时, 一直报错, 找不到原因, 坐等大虾帮忙. php地址: http://download.csdn.net/detail/df274119386/4351419 数据库文件地址: http://download.csdn.net/detail/df274119386/4351446 希望哪位大虾下载下来部署一下, 看问题出在哪 , 万分感谢! 欢迎加q:11250045指导本地运行环境:window7, php5.4.3, apache2.2, mysql5....

bugfree报错,该如何解决

bugfree报错我的bugfree老是报错,有没有知不知道怎么解决的:MySqL服务和Apache服务均正常重启使用版本 MySqL5.0 Apache2.2.15 PHP5.2.13 bugfree2,windows下安装我输入: http:localhost/显示正常PHP页面我输入: http:localhost/bugfre给我报:HTTP 500-内部服务器错误------解决方案--------------------你要么就重新安装一下 ,注意下安装顺序 ------解决方案--------------------就一个http500,鬼才知道是什么错 -----...

PHP中的绝对路径报错解决方法

PHP中的绝对路径报错我是PHP中打开一个txt文件,用的是绝对路径,但是报错了。 $file = fopen("../PHp.txt", "r"); $filesize = filesize("PHp.txt"); echo fread($file,$filesize); fclose($file); ?>Warning: fopen(../PHp.txt) [function.fopen]: failed to open stream: No such file or directory in F:\APMServ5.2.6\APMServ5.2.6\www\htdocs\newfile.php on line 7Warning: f...