随笔分类 - PHP Study
One life is over , the other life is beginning...
摘要:使用命令查看下权限:ls -l ./[target_dir] 这个文件权限变成root了,不再是apache了。 因为在项目中git了下,git执行在root用户下的。应该就是这个原因了。 解决办法: 对整个目录先设置下权限 chown -R apache:apache [target_dir](权
阅读全文
摘要:2021-07-27更新: 今天又遇到这个异常了,前端站点打不开,抛出同样的异常错误。查看连接数,只有8465个(最大连接数设置的是40960)。为了恢复网站,暂时先重启httpd服务。 service httpd start 启动service httpd restart 重新启动service
阅读全文
摘要:<?php header("content-Type: text/html; charset=gb2312"); include_once("DBHelper.php"); include_once("test_array.php");?> <!--==========业务逻辑==========--><?php$conn = new ADOConnection;$conn -> PConnect("localhost","root","weoffi
阅读全文
摘要:<?php header("content-Type: text/html; charset=gb2312"); include_once("DBHelper.php");?> <!--==========业务逻辑==========--><?php$conn = new ADOConnection;$conn -> PConnect("localhost","root","weoffice","eoffice");//数据库连接$conn
阅读全文
摘要://DBHelper.php<?phpclass ADOConnection{//打开数据库的连接function PConnect($ip,$user,$pwd,$database){$db = mysql_connect($ip,$user,$pwd);if(!$db) {print "在连接到数据库服务器时,产生错误".mysql_error();exit;}$link = mysql_select_db($database,$db);if(!$link) {print "在连接上服务器,选择数据库时出现错误".mysql_error();e
阅读全文
摘要:Q:今天在做一个上传的小程序,加了这段代码就行,删了就不行,<form action="example.php" method="post" enctype="multipart/form-data">A:表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况,这个编码格式是application/x-www-form-urlencoded,不能用于文件上传;只有使用了multipart/form-data,才能完整的传递文件数据,进行下面的操作. f
阅读全文
摘要:很多时候我们在本机测试时会将root用户密码设置为空。因为我把php升级到了5.3.1,以前的phpmyadmin版本不能用了,就升级到phpMyAdmin 3.2.4版的时候,会遇到无法以空密码登录root用户的情况。怎么解决呢? 请参照如下步骤: 1、打开程序所在的目录 2、找到libraries目录下的config.default.php文件把 $cfg['Servers'][$i]['AllowNoPassword'] = false;修改成 $cfg['Servers'][$i]['AllowNoPassword'] =
阅读全文