Ben upload.php bir php yükleme işleyicisi var ve orada, ben şu var
<? setcookie("test",100,time()+3600); ?>
Ben ayarlanır çerezleri kontrol ederken ama, ben hiç bir "test" çerez görmüyorum.
Bana dosya yükleme bir cookie set lütfen yardım edebilir? neden bu yükleme komut dosyası tarayıcı tarafından erişilen herhangi normal bir komut dosyası herhangi farklıdır?
İşte var kodu
<?php
if (!empty($_FILES)) {
if(move_uploaded_file($tempFile,$targetFile))
{
setcookie("targetPath",$targetPath,time() + 3600,'/');
print $_COOKIE['targetPath']; // prints fine here
echo 1;
}
else
echo -1;}
else
{
//print_r($_COOKIE);
print "start cookie >> ";
print $_COOKIE['targetPath']; // does not print when I call upload.php standalone
print " << end cookie";
}
?>