哪位兄弟寫個簡單的 php 文件上偉的例子!!!給我開導開導???,網站上的 mysql 數據庫是放在哪個目錄??? 数据库放在ISP提供商装MYSQL的目录,要更新数据库可以自己传个phpMyAdmin到你的PHP文件目录上去即可。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to: phpteam(Fanny)要更新数据库可以自己传个phpMyAdmin到你的PHP文件目录上上面這個你能說清楚點不,我現在還沒有 phpMyAdmin 下面是我正在用的一个上传的小程序,你参考一下吧,你可以把它发挥得很复杂!<html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body bgcolor="#FFFFFF" text="#000000"><?if(empty($cor))$cor='../';$conn=ftp_connect("ftp.shenyang.gov.cn",21);if(!empty($conn)) echo "FTP连接成功!<br>";else { echo "FTP不能成功连接<br>!"; }ftp_login($conn,'myname','mypass');@ftp_chdir($conn,$cor);if(isset($parant))@ftp_cdup($conn);@ftp_chdir($conn);$cor=ftp_pwd($conn);?><form name="form1" method="post" action="ftp.php?cor=<?echo $cor;?>" enctype="multipart/form-data"> <table width="500" border="0" cellspacing="5" cellpadding="0" align="center"> <tr> <td> <div align="center"> <input type="FILE" name="userfile" > </div> </td> </tr> <tr> <td> <div align="center">上传后文件名: <input type="text" name="fname"> </div> </td> </tr> <tr> <td> <div align="center"> <input type="submit" name="upload" value="点击此键上传"> </div> </td> </tr> </table> <input type="hidden" name="MAX_FILE_SIZE" Value="10000000"></form><?//@ftp_systype($conn);if (isset($delete)) { @ftp_delete($conn,$del); echo "$del已经被删除<br>";}?><form name="form2" method="post" action="ftp.php?cor=<?echo $cor;?>"> <input type="submit" name="parant" value="到上级目录"></form><?if(isset($upload)){ @$ftp=ftp_put($conn,$fname,$userfile,$FTP_BINARY); if($ftp) echo "上传成功!<br>"; else echo "上传没有成功,请检查FTP连接<br>";}$filelist=ftp_nlist($conn,'');$sn=count($filelist);?><table width="600" border="0" cellspacing="0" cellpadding="0" align="center"><?for($i=0;$i<$sn;$i++){ switch ($i%4) { case 0:?> <tr> <td><?if(ereg("\.",$filelist[$i])) echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>"; else echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td> <? case 1: ?> <td><?if(ereg("\.",$filelist[$i])>=1) echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>"; else echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td><? case 2: ?> <td><?if(ereg("\.",$filelist[$i])>=1) echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>"; else echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td> <? case 3: ?> <td><?if(ereg("\.",$filelist[$i])>=1) echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>"; else echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td> </tr> <? }}if(($sn%4)!=3) { ?></tr><?}?></table> <?ftp_quit($conn);?></body></html> 防垃圾信息灌水的智能验证码 zend studio开发一个php网站,是不是只能新建一个local php项目,可以新建多个项目么? 二级域名 或 url重写 的问题 求一正则表达式,替换某一规则的表情符号为表情图标(<img>表情) php中如何實現按鈕跳轉, sqlite3大批量插入数据问题[PHP] PHP文件上传下载问题 在Apache Server 上怎样下载一个目录的所有东西,还是需要用什么工具? 请教:PHP的时差问题!!! html页面中的php如何在foreach():添加if判断 高手快来,彻夜难眠 PHP控制打印机的问题
要更新数据库可以自己传个phpMyAdmin到你的PHP文件目录上
上面這個你能說清楚點不,我現在還沒有 phpMyAdmin
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
if(empty($cor))
$cor='../';
$conn=ftp_connect("ftp.shenyang.gov.cn",21);
if(!empty($conn))
echo "FTP连接成功!<br>";
else {
echo "FTP不能成功连接<br>!";
}
ftp_login($conn,'myname','mypass');
@ftp_chdir($conn,$cor);
if(isset($parant))
@ftp_cdup($conn);
@ftp_chdir($conn);
$cor=ftp_pwd($conn);
?>
<form name="form1" method="post" action="ftp.php?cor=<?echo $cor;?>" enctype="multipart/form-data">
<table width="500" border="0" cellspacing="5" cellpadding="0" align="center">
<tr>
<td>
<div align="center">
<input type="FILE" name="userfile" >
</div>
</td>
</tr>
<tr>
<td>
<div align="center">上传后文件名:
<input type="text" name="fname">
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<input type="submit" name="upload" value="点击此键上传">
</div>
</td>
</tr>
</table>
<input type="hidden" name="MAX_FILE_SIZE" Value="10000000">
</form>
<?//@ftp_systype($conn);
if (isset($delete)) {
@ftp_delete($conn,$del);
echo "$del已经被删除<br>";
}
?>
<form name="form2" method="post" action="ftp.php?cor=<?echo $cor;?>">
<input type="submit" name="parant" value="到上级目录">
</form>
<?
if(isset($upload)){
@$ftp=ftp_put($conn,$fname,$userfile,$FTP_BINARY);
if($ftp)
echo "上传成功!<br>";
else
echo "上传没有成功,请检查FTP连接<br>";
}
$filelist=ftp_nlist($conn,'');
$sn=count($filelist);
?>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<?
for($i=0;$i<$sn;$i++)
{
switch ($i%4) {
case 0:
?> <tr>
<td><?if(ereg("\.",$filelist[$i]))
echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>";
else
echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td>
<?
case 1:
?>
<td><?if(ereg("\.",$filelist[$i])>=1)
echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>";
else
echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td>
<?
case 2:
?>
<td><?if(ereg("\.",$filelist[$i])>=1)
echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>";
else
echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td>
<?
case 3:
?>
<td><?if(ereg("\.",$filelist[$i])>=1)
echo "<A HREF=delete.php?del=$filelist[$i]&cor=$cor target=_blank>$filelist[$i]</A>";
else
echo "<A HREF=ftp.php?cor=$cor/$filelist[$i]><b><font color=#FF0000>$filelist[$i]</font></b></A>";break;/**/?></td>
</tr>
<?
}
}
if(($sn%4)!=3)
{ ?>
</tr>
<?}?>
</table>
<?
ftp_quit($conn);
?>
</body>
</html>