Today I have tried to create a simple code work through mkdir,opendir and etc.
Now my code consisting of these :
<?php
echo "<form action='?do=create' method='post'>
Create a Directory(Folder) : <input type='text' name='createll'><input type='submit' name='submit' value='Create(!)'>
</form>";
echo "Directorys Which You Have Uploaded Until Today :<br>";
$dir = "/creater/";
$op = opendir($dir);
while($read = readdir($op)){
echo $read;
}
// Create File Functions
@$input_crt = $_POST['createll'];
if(@$_GET['do'] == 'create'){ if($_POST){
if(!empty($input_crt)){
$crtdir = mkdir($input_crt."_FILE");
if($crtdir){
echo $input_crt." Has Uploaded with Success";
header("Refresh:1; url=t3st.php");
}else {
echo $input_crt." Has Failed";
header("Refresh:1; url=t3st.php");
}
}else {
echo "Label is Empty";
header("Refresh:1; url=t3st.php");
}}}
// End Of Functions
?>
As You See, in this code : (User) can create a directory in folder which it called CREATER, now i want to that (User) can see directory which he(she) create these,so i added _FILE to end of directory which user will create , and when user want to directory which he created ,he'll searching them with ereg(_FILE) , so my trouble is in $dir variable, how can i do that content of $dir(var) be ("creater") folder, because when mkdir() function work , it will make the folders in the creater folder. Help Plz


Sign In
Create Account

Back to top









