Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,030

HOME > PHP > PHP Forum > ช่วยทีคร๊าบบบ..เกี่ยวกับรูปภาพ Fatal error: Maximum execution time of 30 seconds exceeded



 

ช่วยทีคร๊าบบบ..เกี่ยวกับรูปภาพ Fatal error: Maximum execution time of 30 seconds exceeded

 



Topic : 014836

Guest




Fatal error: Maximum execution time of 30 seconds exceeded in
c:\AppServ\www\newsuannan\admin\images_add.php on line 66
=========================================================

============= file images_add.php ===========================
<? include("session_admin.php"); ?>
<?php include('../connections/connectdb.php'); ?>
<html>
<head>
<title></title>
<link href="../css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="798" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><?php include "admin_headder.php";?></td>
</tr>
<tr>
<td width="185" valign="top"><?php include "admin_menu.php";?></td>
<td width="4" background="images_admin/line2.gif">&nbsp;</td>
<td width="609" valign="top">
<center><h3>
<?php
echo"<br><br><br><br><br><br>";
echo"<center><h3>";
echo"<img src=\"images_admin/progress.gif\"><br>";
echo"<font color=#0000CC>Please Wait ...</font>";
echo"</center>";

for ($x = 1; $x <=10; $x++) {

/*=================ก็อบปี้รูปภาพ นักศึกษา===================*/
$pic="pic".$x;
$description="de".$x;
$desc=$_POST[$description];
$today=date("YMd" );
$totime=date("his");
$pic_name =$group_id.$today.$totime.$x;
$photo_tmp=$HTTP_POST_FILES[$pic]['tmp_name'];
$photo_name=$HTTP_POST_FILES[$pic]['name'];
$photo_type=$HTTP_POST_FILES[$pic]['type'];
$photo_size=$HTTP_POST_FILES[$pic]['size'];
if($photo_tmp<>""){
//move_uploaded_file($photo_tmp,"./photo/".$photo_name);
if($HTTP_POST_FILES[$pic]['type']=="image/gif"){ $ftype="gif"; }
if($HTTP_POST_FILES[$pic]['type']=="image/pjpeg"){ $ftype="jpg"; }
if($HTTP_POST_FILES[$pic]['type']=="image/x-png"){ $ftype="png"; }
if ($ftype=="gif") {
$imgc=ImageCreateFromGIF;
$imgj=ImageGIF; }
if ($ftype=="png") {
$imgc=ImageCreateFromPNG;
$imgj=ImagePNG; }
if ($ftype=="jpg") {
$imgc=ImageCreateFromJPEG;
$imgj=ImageJPEG; }

//----------------------------------- Resize --------------------------------------/
$images = $photo_tmp;
//กำหนดความสูงของรูปใหม่
$height=768;
$size=GetimageSize($images);
$width=round($height*$size[0]/$size[1]);
$images_orig = $imgc($images);
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
$imgj($images_fin,"../images_upload/gallery_activities_big/".$pic_name.".".$ftype);
ImageDestroy($images_orig);
ImageDestroy($images_fin);
$pic_name2=$pic_name.".".$ftype;
//-------------------------------------------------------------------------------------------/
#เริ่มสร้างภาพขนาดเล็กหรือใหญ่ตามต้องการ

$ThumbPhoto="../images_upload/gallery_activities_big/";
$ThumbFile=$ThumbPhoto.$pic_name2;

$ThumbH=130;
$Quality=100;

List($SourceW,$SourceH)=GetImageSize($ThumbFile);

$Percent=$ThumbH/$SourceH ;
$ThumbW=$SourceW*$Percent;

$ImgTarget=ImageCreateTrueColor($ThumbW,$ThumbH);
$ImgSource=$imgc($ThumbFile);

#ImageCopyResampled($ImgTarget,$ImgSource,0,0,0,0,$ThumbW,$ThumbH,$SourceW,$SourceH);
ImageCopyResampled($ImgTarget,$ImgSource,0,0,0,0,$ThumbW,$ThumbH,$SourceW,$SourceH);

$imgj($ImgTarget,"../images_upload/gallery_activities_small/".$pic_name2,$Quality);

ImageDestroy($ImgTarget);
ImageDestroy($ImgSource);

$sql="insert into gallery_activities values('','$group_id','$pic_name2','$desc','$valid_admin',now())";
$result=mysql_query($sql,$conn);
if (!$result)
{
// echo"Error : ".mysql_error();
// exit();
print "<script>";
print "alert('Error : Can't insert Detail into Database'); ";
print "location.href='javascript:history.back();'";
print "</script>";
exit();

}

}


}
print "<script>";
print "location.href='group_activities_show.php?id=$id&des=$des'";
print "</script>";
exit();

?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<? mysql_close($conn); ?>


Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2 ส.ค. 2550 09:00:05 By : นายกระจอก View : 1650 Reply : 1
 

 

No. 1

Guest


code ผิดแล้วท่าน






Date : 2 ส.ค. 2550 09:30:06 By : อิอิ
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยทีคร๊าบบบ..เกี่ยวกับรูปภาพ Fatal error: Maximum execution time of 30 seconds exceeded
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่