 |
ถามเรือ่งสร้าง folder คือว่าผมใช้คำสั่งแบบนี้ในการสร้าง Folder ครับ <?php mkdir("/path/to/my/dir", 0700); ?> แต่มันไม่สร้างคับ |
|
 |
|
|
 |
 |
|
ขอดูโค้ดของคุณหน่อยครับ 
|
 |
 |
 |
 |
Date :
3 ธ.ค. 2550 19:26:38 |
By :
lozomac |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
นี่ครับ
require('../'.DIR_INCLUDE.'data.php');
$tb="t_member";
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้");
$sql = "select * from $tb where studentid ='$username'";
$dbquery = mysql_query($sql);
$num_rows = mysql_num_rows($dbquery);
if(!$num_rows){
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้");
$insert_table = mysql_query("INSERT INTO $tb (studentid,password,status,studentnumber,classid,first,firstname,lastname,email,telephone,address,datesave,ipaddress) values ('$username','$password1','Y','$code','$classroom','$pre','$firstname','$lastname','$email','$telephone','$address','$date','$ip')") or die ("Can't insert data to table.");
mkdir("../file/".$username, 0777);
header("refresh: 0; url=../index.php?C=login&P=main");
}
|
 |
 |
 |
 |
Date :
4 ธ.ค. 2550 08:57:17 |
By :
lermjunior |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลอง change mode directory ที่ชื่อว่า file ให้เป็น 777
|
 |
 |
 |
 |
Date :
4 ธ.ค. 2550 12:26:37 |
By :
away |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ของเราใช้ได้กรณี เป็น window ใช้ chmod("path", 0777) หรือ 0xxx ตามสะดวก แต่ งง ตรง path linux อะ ถ้ามีผู้รู้ช่วยหน่อยครับ add ที่ เมล์ก็ได้ [email protected]
|
 |
 |
 |
 |
Date :
2009-11-09 11:03:02 |
By :
meHelp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|