Jump to content
php.lv forumi

palidziet ar php.


suport

Recommended Posts

a1.png << istas saadi bet vajag

a2.png

 

te kods

<?php
if ($handle = opendir('C:/AppServ/www/demoo/')) {
while (false !== ($file = readdir($handle))) {
if (strlen($file) > 4)
{
$gabali = explode("-", $file);
$date = $gabali[1];
$mape = $gabali[2];
$mapesgabali = explode(".", $mape);
$name = $mapesgabali[0];
$year = substr($date,0,2);
$month = substr($date,2,2);
$day = substr($date,4,2);
$hour = substr($date,6,2);
$minute = substr($date,8,2);
echo "<center>$day.$month.$year             $hour:$minute             $name             <a href=\"http://cs.1wish.lv/demoo/$file\">Download</a></br></center>";
}
}
closedir($handle);
}
?>

 

 

kads var partaisiit ta lai buutu taa ? LUDZU !

Link to comment
Share on other sites

Vnk sakārto echo rindinju kaa vajag.. piemēram (uz aatro rakstīju un varbūt kautkur nokļūdījos.. bet nju ideja skaidra)

<table><tr><td>Karte</td><td>datums</td></tr>

<?php

if ($handle = opendir('C:/AppServ/www/demoo/')) {

while (false !== ($file = readdir($handle))) {

if (strlen($file) > 4)

{

$gabali = explode("-", $file);

$date = $gabali[1];

$mape = $gabali[2];

$mapesgabali = explode(".", $mape);

$name = $mapesgabali[0];

$year = substr($date,0,2);

$month = substr($date,2,2);

$day = substr($date,4,2);

$hour = substr($date,6,2);

$minute = substr($date,8,2);

echo "<tr><td><a href=\"http://cs.1wish.lv/demoo/$file\">$name</a></td><td>$day.$month.$year $hour:$minute</td><tr>";

}

}

closedir($handle);

}

?>

</table>

Link to comment
Share on other sites

<table><tr><td>Karte</td><td>Izmērs</td><td>datums</td></tr>
<?php
if ($handle = opendir('C:/AppServ/www/demoo/')) {
while (false !== ($file = readdir($handle))) {
if (strlen($file) > 4)
{
$gabali = explode("-", $file);
$date = $gabali[1];
$mape = $gabali[2];
$mapesgabali = explode(".", $mape);
$name = $mapesgabali[0];
$year = substr($date,0,2);
$month = substr($date,2,2);
$day = substr($date,4,2);
$hour = substr($date,6,2);
$minute = substr($date,8,2);
$izmers =  filesize($file);
echo "<tr><td><a href=\"http://cs.1wish.lv/demoo/$file\">$name</a></td><td>$izmers</td><td>$day.$month.$year $hour:$minute</td><tr>";
}
}
closedir($handle);
}
?>
</table>

šitā laikam..

Link to comment
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...
×
×
  • Create New...