711
צפיות
צפיות
3
תשובות
תשובות
שלום, צריך עזרה ב PHP
האמת שאין לי ידע בשפה, אלה רק ב ASP, פשוט יש לי קובץ ASP שאני צריך שיהפכו לי אותו ל PHP. לא משהו מורכב במיוחד.הקובץ הזה סה"כ מציג את הקבצים שנמצאים בתיקייה באופן מסודר.
זה לדוגמא
צירפתי את הקובץ, בבקשה תעזרו לי
http://eli.rabanim.net/shidurim/%D7%A7%D7%91%D7%9C%D7%94/%D7%9C%D7%A6%D7%A4%D7%99%D7%99%D7%94/%D7%94%D7%A8%D7%91%20%D7%94%D7%92%D7%90%D7%95%D7%9F%20%D7%91%D7%A0%D7%99%D7%94%D7%95%20%D7%A9%D7%9E%D7%95%D7%90%D7%9C%D7%99/
כתובות אינטרנט נלוות:
זה לדוכמא
3 תשובות
טוב נו…
function show_content($dir){
if(!is_dir($dir))
return;
$dir = dir($dir);
while(($file=$dir->read())!==false){
if($file=="." || $file=="..") continue; // current and parent dirs.
if(is_dir("$dir/$file") echo "Directory: $file<br>";
else echo "File: $file<br>";
}
}
well I hope you've got it. Good luck.
שיהיה יותר ברור ….
Thats all the code you need but I see you use database or something.
לא ממש התעמקתי בקוד שלך אבל זה אמור לעשות את העבודה כמו שצריך עם השינויים
שאני מאמין אתה יודע לעשות אותם.
בדובר בשינויים HTML או CSS
פשוט תחליף את
c:/what/ever/dir/you/want
בנתיב בתיקייה
<?php
function show_content($dir){
if(!is_dir($dir))
return;
$di = dir($dir);
while(($file=$di->read())!==false){
if($file=="." || $file=="..") continue; // current and parent dirs.
if(is_dir("$dir/$file")) echo "<div class='dir_div'>$file</div>";
else echo "<div class='file_div'>$file</div>";
}
$di->close();
}
?>
<html>
<head>
<style type="text/css">
.dir_div, .file_div {
float: left;
width: 120px;
height: 30px;
text-align: center;
padding-top: 50px;
background-position: center center;
background-repeat: no-repeat;
}
.dir_div{
background-image: url(http://eli.rabanim.net/fso/folder.gif);
}
.file_div{
background-image: url(http://eli.rabanim.net/fso/wmf.gif);
}
.wrapper{
width: 700px;
}
</style>
</head>
<body dir="rtl">
what ever you want here.
<hr>
<center>
<div class='wrapper'>
<?php show_content("c:/what/ever/dir/you/want"); ?>
</div>
</center>
</body>
</html>
בהצלחה
תגיד,איזה רמת הרשאה אני צריך לתיקייה?