hej
Ér der en der kan forklare dette. Jeg køre følgende kode i 2 forskellige
filer
men jeg får ikke det samme output
------------
if(isset($UploadedFile) and isset($title) != '')
{
if ($UploadedFile_type == 'image/pjpeg' and $UploadedFile_size <
'307200')
{
$filecheck = false;
do
{
$count = time();
if
(file_exists("c:\\Inetpub\\wwwroot\\image\\screenshots\\".$count.".jpg") ==
false)
{
$sql = "INSERT INTO screenshots (image, type, title, author)
VALUES ('/image/screenshots/".$count.".jpg', '$type', '$title',
'$Username')";
$sql_result = mysql_query($sql) or die("mysql_query :
".mysql_error());
copy($UploadedFile,
"C:\\Inetpub\\wwwroot\\image\\screenshots\\".$count.".jpg");
$filecheck = true;
}
}while($filecheck == false);
}
else
{
}
unlink($UploadedFile);
print "UploadedFile = $UploadedFile<BR>UploadedFile_type =
$UploadedFile_type<BR>UploadedFile_size = $UploadedFile_size";
-----------------------
output fra fil1
UploadedFile = C:\PHP\uploadtemp\php9C5.tmp
UploadedFile_type = image/pjpeg
UploadedFile_size = 5280
output fra fil2
Warning: Undefined variable: UploadedFile_type in
c:\inetpub\wwwroot\testdesign.php on line 345
Warning: Undefined variable: UploadedFile_size in
c:\inetpub\wwwroot\testdesign.php on line 345
UploadedFile = C:\\Documents and
Settings\\i6566\\Desktop\\site\\image\\skybottom.jpg
UploadedFile_type =
UploadedFile_size =
så fil1 virker som den skal men det gør fil2 ikke (hvorfor ?)
læs fil1 :
http://www.rk2gods.com/fil1.txt
læs fil2 :
http://www.rk2gods.com/fil2.txt
--
Mvh
Jacob Brandrup
http://www.forgottenrealms.dk/