Ⅰ 下载的PHP MYSQL网站源码 怎么上传到虚拟空间
sql文件 是把数据导入到你的mysql里面. 一般是在phpmyadmin里漏戚导入 你去问你的空间商 phpmyadmin的地址是什么 然后用你的帐号密码登录进去 在左边选项区域应该有类似 "Import "或者"导入"的选项 有数据框的话 你用记事本打开你的SQL文件 然后复制进输入框 点确定. 如果phpmyadmin的版本是最新的话 应该有个文件导入 你直接上传sql上去 他会自动导入 关于config.php是数据库配置文件 一般程序员陵饥写这个程序的时候 要填返汪陵写的地方 都有注释的,你用记事本打开 照着写就可以了 我这里也不能教你写 每个程序的配置文件都不一样的.
Ⅱ PHP mysql源码怎么在本地连接数据库啊
mysql_connect('数据库服务器IP','登陆名','密码') or dir('连接未成功');
mysql_select_db('数据库名') or dir('数据库不回存在!答');
mysql_query("sql语句");
Ⅲ PHP+mysql网站源码如何安装
这个是在服务器端安装php,并且关联mysql的一个步骤和提示。
具体步骤如下(以phpcms为例):
1. 安装网站程序
在新的网站输入http://您的域名/install/ 安装与原来网站字符一致的PHPCMS V9,在数据库是需要用到数据库名和头,请使用上面一些的内容,如sooks与dns。数据库配置文件在“caches/configs”文件夹下的“database.php”,这里主要是数据库的名称及头。(只要修改好配置文件一致就行)
2. 上传原网站备份数据
将备份的SQL文件上传到新的网站"caches/bakup"文件夹。
3. 上传原网站模板
将原来网站的模板文件上传到"phpcms/templates"文件夹。
4. 上传CSS文件
如果没有使用默认程序的CSS,请将备份的CSS上传到“statics/css”
5. 上传附件
将下载的“uploadfile”文件夹上传到新的网站根目录下。
6. 恢复数据
登录到新网站的后台,在“扩展”菜单下的“数据库工具”中选择“数据导入”,在下面选择上传的备份数据,请检查是否完整,选中全部后单击“恢复”将数据进行恢复。 站点管理域名
7. 更新网站缓冲
完成数据恢复后,请更新全站的缓冲,再检查相应的栏目数据是否完成。
8. 生成网站与栏目及首页
检查网站的设置后,生成网站的网页、栏目及首页,就可以完成了。
Ⅳ 完整的php&mysql的留言板源代码,可以运行的
input.htm
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>input</title>
</head>
<body>
<form method="POST" action="receive.php">
<p>您的姓名: <input type="text" name="T1" size="20"></p>
<p>您的性别:男<input type="radio" value="0" name="R1">
女<input type="radio" name="R1" value="1"></p>
<p>您的EMAIL:<input type="text" name="T2" size="35"></p>
<p>您的留言内容:</p>
<p> <textarea rows="16" name="S1" cols="45"></textarea></p>
<p> </p>
<p> <input type="submit" value="提交" name="B1">
<input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>
receive.php
<?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$ip=getenv(REMOTE_ADDR);
$sql = "INSERT INTO `guestbook`.`gbook` (`id`, `name`, `sex`, `email`, `info`, `ip`, `time_at`) VALUES (NULL, '$T1', '$R1', '$T2', '$S1', '$ip', NOW());";
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
mysql_query($sql);
$result=mysql_query("select * from $table");
while ($arr=mysql_fetch_array($result))
{
if ($arr[2]==0)
$gender='先生';
else
$gender='女士';
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Receive</title>
</head>
<body style="background-attachment: fixed">
<table border="1" width="100%" id="table1" bgcolor="#FFFFFF">
<tr>
<td bordercolor="#FFFFFF" bgcolor="#C0C0C0"><?=$arr[6]?>(<?=$arr[5]?>)<p><?=$arr[1]?> <?=$gender?><<a href="<?=$arr[3]?>"><?=$arr[3]?></a>>
写到:</td>
</tr>
<tr>
<td><?=$arr[4]?><p> </p>
<p><a href="del.php?id=<?=$arr[0]?>">[删除]</a>
<a href="modify.php?id=<?=$arr[0]?>">[修改]</a>]</td>
</tr>
</table>
</body>
</html>
<?php
echo '<p>';
echo '<p>';
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<p><a href="input.htm"><继续留言></a></p>
</body>
</html>
del.php
<?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$sql="DELETE FROM $table WHERE id=$id";
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
$result=mysql_query($sql);
if ($result)
echo "删除成功";
else
echo "删除失败";
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<p><a href="receive.php"><返回首页></a></p>
</body>
</html>
modify.php
<?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$ip=getenv(REMOTE_ADDR);
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
$result=mysql_query("select * from $table where id=$id");
$arr=mysql_fetch_array($result);
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>input</title>
</head>
<body>
<form method="POST" action="modify_ok.php?id=<?=$id?>">
<p>您的姓名: <input type="text" name="T1" size="20" value="<?=$arr[1]?>"></p>
<p>您的性别:
<?php
if ($arr[2]==0) echo '男<input type="radio" value="0" name="R1" checked>
女<input type="radio" name="R1" value="1"></p>';
else echo '男<input type="radio" value="0" name="R1">
女<input type="radio" name="R1" value="1" checked></p>';
?>
<p>您的EMAIL:<input type="text" name="T2" size="35" value="<?=$arr[3]?>"></p>
<p>您的留言内容:</p>
<p> <textarea rows="16" name="S1" cols="45" ><?=$arr[4]?></textarea></p>
<p> </p>
<p> <input type="submit" value="修改" name="B1">
<input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>
modify_ok.php
<?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);;
$sql = "UPDATE `guestbook`.`gbook` SET `name` = '$T1', `sex` = '$R1', `email` = '$T2', `info` = '$S1' WHERE `gbook`.`id` = '$id' LIMIT 1;";
$result=mysql_query($sql);
if ($result)
echo "修改成功";
else
echo "修改失败";
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<p><a href="input.htm"><继续留言></a></p>
</body>
</html>
Ⅳ 神奇的网友,你有php+ MySQL网站数据库搜索的源代码吗在页面搜索栏里敲进几个字,然后数据库
用sql语句查询数据库,
ms sql server
1、查询所有表
select [id], [name] from [sysobjects] where [type] = 'u' order by [name]
2、查询所有数据库
3、select [name] from [sysdatabases] order by [name]
查询表中字段
select [name] from [syscolumns] where [name] = 'tableXXX'order by [colid]
oracle
1、查找表的所有索引型改(包括索引名,类型,构成列):
select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_name = 要查询的表
2、查找表的主键(包括名称,构成列):
select cu.* from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'P' and au.table_name = 要查询的表
3、查找表的唯一性约束(包卜磨判括名称,构成列):
select column_name from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'U' and au.table_name = 要查询的表
4、查找表的外键(包括名称,引用表的表名和对应的键名,下面是分成多步查询):
select * from user_constraints c where c.constraint_type = 'R'游塌 and c.table_name = 要查询的表
查询外键约束的列名:
select * from user_cons_columns cl where cl.constraint_name = 外键名称
查询引用表的键的列名:
select * from user_cons_columns cl where cl.constraint_name = 外键引用表的键名
5、查询表的所有列及其属性
select t.*,c.COMMENTS from user_tab_columns t,user_col_comments c where t.table_name = c.table_name and t.column_name = c.column_name and t.table_name = 要查询的表
6、查询所有表
select* from tabs
Ⅵ 在Linux系统下利用PHP和MySQL开发的网站源代码拷贝到windows下能正常运行吗
绝对能运行。不过你要注意下以下几点
第一,mysql版本,2个服务器系统下的mysql版本最好是相同,如果不同有可能源码网站会有错误。
第二,Linux系统上传必须要二进制上传,切忌,否则源码也会有报错,win系统就无所谓啦,win系统如果源码无特殊要求,没有上传规则
小弟给客户做了一些网站的经验,和自己运营独立服务器的经验,小谈一下。 不过我还是建议用win系统,相对来讲win系统好管理,win2003比较常用的,可以尝试win2008口碑非常不错。Linux系统本身就是开源的,漏洞不好打补丁。
希望能帮到你,俺是手机上网的,一个个字打的,很吃力,嘻嘻。 小弟网站名称“站术网”,我网站里面有这些教程,您可以看看,兴许可以用的上,在网站右上角帮助中心板块
Ⅶ PHP+MYSQL的网站源码怎么修改需要用到什么工具软件
如枝毁果需要改页面效果启搭升用DW,如悄老果改PHP代码用zend studio 或者 PHP designer都可以哇
Ⅷ 怎么将下载的(php+mysql+apache)网站模版源代码放到的apache服务器上去运行成功啊,求指导
先用FTP客户端如flashfxp这在的软件把资料上传到apache服务器,再把数据库MYSQL导上去,可以用phpmyadmin等,导完后把程序里面的数据库链接改成你的