Jump to content
Sign in to follow this  
syira86

Bgmana Nk Create Folder

Recommended Posts

salam sume....sy nk tnye mcm mne nk create folder dan upload file ke dlm folder tersebut...sy dah buat function upload file n tiba2 terpikir yg maklumat jabatan sbnarnye dlm bntuk folder yg dikategorikan dan ia sntiasa berubah dri segi name folder..bgmane nk atasi mslh nie...harap kak n abg2 dpt tlg n bri ckit idea...tq

Share this post


Link to post
Share on other sites
nama folder tu diambil daripada apa?
adkh dr file yg di upload?
sistem ni buat menggunakn apa? Edited by johnburn

Share this post


Link to post
Share on other sites
nk create folder guna php...mcm nie department ade file2 lama dari 2-3thn yg lepas..slalunye staff akn burn maklumat nie dlm cd..maslahnye staff kne amek mase nk cri mklumat dri cd 2...so sy bg idea untk bt sistem simpan data..mula2 staf kne create folder dan namakn folder then upload file ke dlm folder 2 pas 2 ade fungsi carian utk cari file 2....tdi sy cri coding create nie ...dapat tapi bla jalan je php..folder created 2 ade kt xampp la...cmne ye??..blur

Share this post


Link to post
Share on other sites
apa mksd syira ngan dia create folder dlm xampp tu? cmne struktur semua file2 tu? dan kt mana syira spttnya nk upload?
ke nk bt struktur cmni struktur tu cmni:
[code]
htdocs >> folderProject >> folderupload
|___createdFolder
|___createdFolder2
|___createdFolder3
[/code]
Bleh bg contoh code yg syira pkai tu x? Edited by johnburn

Share this post


Link to post
Share on other sites
[code]
<form action= "test4.php" method="post">
<input type="text" name = "foldername" size="30" />
<input type="submit" value="Add" />
</form>

[/code]

[code]
<?php


if($_GET[foldername] != NULL) // i have a method get form
{
$dir = 'C:\\xampp\\'. $_GET[foldername]; //see the double \\
if(!is_dir($dir))
{
mkdir($dir);
echo $dir." created!";
}
}
?>

[/code]

Share this post


Link to post
Share on other sites
mula add folder n pas 2 kuar option manage folder ...dlm manage folder ade rename..delete n update n upload file.bila clik option upload file...kuar upload file form n ade option select folder mne nk di simpan ..

if ade idea len...gtau..sy pn cm was2 je dng idea nie

Share this post


Link to post
Share on other sites
ada baiknya semua folder yg nk di create tu syira ltk dlm satu folder. kl syira nk create semua folder tu dlm satu folder nama upload cnthnye, jd tkar bhgian ni:
[code]$dir = 'upload/'. $_GET[foldername];[/code]

kl tgk kod syira bg tu, ada satu lg kesilapan. dlm form, method yg digunakan [b]post[/b] tp dlm php tu syira pkai [b]$_GET[/b]
so tukar bhgian tu gak

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...