Mevcut hata:
Alıntı
$dirname = 'dizin/';
if (is_writable($dirname))
{
echo ' The file is writable ';
}
else
{
echo ' The file is not writable ';
$path = 'dizin/';
chmod($path, 0777);
} 13
●2.222
$dirname = 'dizin/';
if (is_writable($dirname))
{
echo ' The file is writable ';
}
else
{
echo ' The file is not writable ';
$path = 'dizin/';
chmod($path, 0777);
} <?php
// uzak siteden dosya kopyalama
$src = "http://www.adresim.com/dosyam.zip";
$dst = "cache/dosyam.zip";
if (!copy($src, $dst))
{
echo "copy from remote server to <strong>" . $dst . "</strong> failed.";
}
else
{
echo "copy to cache: Success!";
// exit;
}
// yeni dizine CHMOD --> sorun burada
$dirname = 'dizin/';
if (is_writable($dirname))
{
echo ' The file is writable ';
}
else
{
echo ' The file is not writable ';
$path = 'dizin/';
chmod($path, 0777);
}
// yeni dizine kopyalama
$src = "cache/dosyam.zip";
$dst = "dizin/dosyam.zip";
if (!copy($src, $dst))
{
echo " copy from remote server to <strong>" . $dst . "</strong> failed. ";
}
else
{
echo " copy to tr/: Success! ";
// exit;
}
?> $dirname = 'test/';
if (is_writable($dirname))
{
echo " $dirname dizini yazilabilir";
}
else
{
echo " $dirname dizini yazilabilir degil";
chmod($dirname, 0777);
}