|
|
|
[มือใหม่มากๆ]มีปัญหาการใช้งานระบบปฎิทินคร้าบ ช่วยผมด้วย |
|
|
|
|
|
|
|
ทำไมไม่เรียก address เป็น localhost ละครับ ?
|
|
|
|
|
Date :
2013-10-22 21:33:27 |
By :
yamcrocodile |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองเรียนแบบ localhost/mk/homepage.php ดูครับ
|
|
|
|
|
Date :
2013-10-22 21:34:08 |
By :
maisurin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ก็ยังเป็นอยู่อ่าครับ
|
|
|
|
|
Date :
2013-10-22 21:37:21 |
By :
adisorn99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
search -> short_open_tags
|
|
|
|
|
Date :
2013-10-22 21:39:51 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
google ครับ
|
|
|
|
|
Date :
2013-10-22 21:44:37 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ผมว่าเช็คที่โค้ดดูอีกทีดีกว่าคับ
|
|
|
|
|
Date :
2013-10-22 21:45:08 |
By :
maisurin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เขียน tag php แบบ เต็มๆดีกว่าครับ
Code (PHP)
<?PHP
?>
|
|
|
|
|
Date :
2013-10-22 21:45:31 |
By :
Manussawin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://www.thaicreate.com/php/php-install-xampp.html
แต่เราก็สามารถที่จะปรับแต่งค่า short_open_tag ให้เป็น On ได้ที่ไฟล์ php.ini
C:\xampp\php\php.ini
short_open_tag = On
|
|
|
|
|
Date :
2013-10-22 21:50:45 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notice: Use of undefined constant j - assumed 'j' in C:\xampp\htdocs\lastmk\calendar.php on line 17
Notice: Use of undefined constant a - assumed 'a' in C:\xampp\htdocs\lastmk\calendar.php on line 18
Notice: Use of undefined constant A - assumed 'A' in C:\xampp\htdocs\lastmk\calendar.php on line 19
Notice: Use of undefined constant B - assumed 'B' in C:\xampp\htdocs\lastmk\calendar.php on line 20
Notice: Use of undefined constant d - assumed 'd' in C:\xampp\htdocs\lastmk\calendar.php on line 21
Notice: Use of undefined constant D - assumed 'D' in C:\xampp\htdocs\lastmk\calendar.php on line 22
Notice: Use of undefined constant F - assumed 'F' in C:\xampp\htdocs\lastmk\calendar.php on line 23
Notice: Use of undefined constant g - assumed 'g' in C:\xampp\htdocs\lastmk\calendar.php on line 24
Notice: Use of undefined constant G - assumed 'G' in C:\xampp\htdocs\lastmk\calendar.php on line 25
Notice: Use of undefined constant h - assumed 'h' in C:\xampp\htdocs\lastmk\calendar.php on line 26
Notice: Use of undefined constant H - assumed 'H' in C:\xampp\htdocs\lastmk\calendar.php on line 27
Notice: Use of undefined constant i - assumed 'i' in C:\xampp\htdocs\lastmk\calendar.php on line 28
Notice: Use of undefined constant I - assumed 'I' in C:\xampp\htdocs\lastmk\calendar.php on line 29
Notice: Use of undefined constant l - assumed 'l' in C:\xampp\htdocs\lastmk\calendar.php on line 30
Notice: Use of undefined constant L - assumed 'L' in C:\xampp\htdocs\lastmk\calendar.php on line 31
Notice: Use of undefined constant m - assumed 'm' in C:\xampp\htdocs\lastmk\calendar.php on line 32
Notice: Use of undefined constant M - assumed 'M' in C:\xampp\htdocs\lastmk\calendar.php on line 33
Notice: Use of undefined constant n - assumed 'n' in C:\xampp\htdocs\lastmk\calendar.php on line 34
Notice: Use of undefined constant o - assumed 'o' in C:\xampp\htdocs\lastmk\calendar.php on line 35
Notice: Use of undefined constant r - assumed 'r' in C:\xampp\htdocs\lastmk\calendar.php on line 36
Notice: Use of undefined constant s - assumed 's' in C:\xampp\htdocs\lastmk\calendar.php on line 37
Notice: Use of undefined constant S - assumed 'S' in C:\xampp\htdocs\lastmk\calendar.php on line 38
Notice: Use of undefined constant t - assumed 't' in C:\xampp\htdocs\lastmk\calendar.php on line 39
Notice: Use of undefined constant T - assumed 'T' in C:\xampp\htdocs\lastmk\calendar.php on line 40
Notice: Use of undefined constant u - assumed 'u' in C:\xampp\htdocs\lastmk\calendar.php on line 41
Notice: Use of undefined constant w - assumed 'w' in C:\xampp\htdocs\lastmk\calendar.php on line 42
Notice: Use of undefined constant W - assumed 'W' in C:\xampp\htdocs\lastmk\calendar.php on line 43
Notice: Use of undefined constant y - assumed 'y' in C:\xampp\htdocs\lastmk\calendar.php on line 44
Notice: Use of undefined constant Y - assumed 'Y' in C:\xampp\htdocs\lastmk\calendar.php on line 45
Notice: Use of undefined constant z - assumed 'z' in C:\xampp\htdocs\lastmk\calendar.php on line 46
Notice: Use of undefined constant Z - assumed 'Z' in C:\xampp\htdocs\lastmk\calendar.php on line 47
Notice: Undefined variable: mon in C:\xampp\htdocs\lastmk\calendar.php on line 49
Notice: Undefined variable: year in C:\xampp\htdocs\lastmk\calendar.php on line 54
Notice: Undefined variable: PHP_SELF in C:\xampp\htdocs\lastmk\calendar.php on line 80
Notice: Undefined variable: week in C:\xampp\htdocs\lastmk\calendar.php on line 95
มาแบบนี้แทนอ่าครับ ลองเอาโค๊ดต้นฉบับมาเลย
|
|
|
|
|
Date :
2013-10-22 22:00:57 |
By :
adisorn99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notice: Undefined variable: PHP_SELF in C:\xampp\htdocs\lastmk\calendar.php on line 81
Notice: Undefined variable: week in C:\xampp\htdocs\lastmk\calendar.php on line 96
ตอนนี้เหลือแค่นี้แล้วไม่ทราบว่าต้องทำยังไงหรอครับ
>อันนี้จาก 81 นะครับ
Code (PHP)
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a> $year_view -
$mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
|
ประวัติการแก้ไข 2013-10-22 22:27:24
|
|
|
|
Date :
2013-10-22 22:24:27 |
By :
adisorn99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทดลองใช้ตัวนี้ครับ $_SERVER['PHP_SELF']
Notice: Undefined variable: week in C:\xampp\htdocs\lastmk\calendar.php on line 96
ต้องเอาบรรทัดที่ 96 มาดู
|
|
|
|
|
Date :
2013-10-22 22:30:57 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$_SERVER['PHP_SELF'] ให้ใส่ตรงไหนอ่าครับ
บรรทัด 96 ผมแก้ไขได้ด้วยการใส่
$week=0; แบบนี้ถูกไหมครับ
ตอนแรกเป็นแบบนี้
$week++;
|
ประวัติการแก้ไข 2013-10-22 22:35:16
|
|
|
|
Date :
2013-10-22 22:34:11 |
By :
adisorn99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$week=0; 96 มีแค่นี้เองครับ
ทั้งระบบนะครับ
Code (PHP)
<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
-->
</style>
<form id="form1" name="form1" method="post" action="">
<table width="0" border="0" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="f2f2f2"><div align="center"><font color="#0000FF" style="font-family:sans-serif"
size="+6">
<?php
$a= date('j'); // , 1 to 31
$b = date('a'); // am,
$c = date('A'); // AM,
$d = date('B'); // Swatch Internet time 000 -999
$e = date('d'); // , 01 to 31
$f = date('D'); // , sat
$g = date('F'); // , November
$h = date('g'); // , 1 through 12
$hh = date('G'); // , 0 through 23
$i = date('h'); // , 01 through 12
$j = date('H'); // , 00 through 23
$k = date('i'); // , 00 to 59
$l = date('I'); // 0, 1 if Daylight Savings Time, 0 otherwise.
$m = date('l'); // , Sunday through Saturday
$n = date('L'); // 0, 1 if it is a leap year, 0 otherwise.
$o = date('m'); // , 01 through 12
$p = date('M'); // , Jan through Dec
$q = date('n'); // , 1 through 12
$r = date('o'); // Example: +0200
$s = date('r'); // Example: Thu, 21 Dec 2000 16:01:07 +0200
$t = date('s'); // 00 through 59
$u = date('S'); // st, nd, rd or th. Works well with j
$v = date('t'); // 28 through 31
$w = date('T'); // time zoneseting Examples: EST, MDT ...
$x = date('u'); // See also time()
$y = date('w'); // 0 (for Sunday) through 6 (for Saturday)
$z = date('W'); // Example: 42 (the 42nd week in the year)
$aa = date('y'); // Examples: 99 or 03
$bb = date('Y'); // Examples: 1999 or 2003
$cc = date('z');
$dd = date('Z');
$mon=0;
if(!$mon){
$mon = $o ;
}else{-
$mon = $mon ;
}
$year=0;
if(!$year){
$year = $bb ;
}else{
$year = $year;
}
$firstday = mktime(0,0,0,$mon,1,$bb);
$firstdays = date('w',$firstday);
$lastdays = date('t',$firstday);
$year_view = date('Y',$firstday);
$mon_view = date('m',$firstday);
echo"
<script>
function d_s( su , mnp){
if(mnp == 'm'){
document.dat_form.mon.value = su - 1 ;
}else{
document.dat_form.mon.value = su + 1 ;
}
document.dat_form.submit();
}
</script>
<form name=dat_form action={$_SERVER['PHP_SELF']} method=post>
<input type=hidden name=mon value=''>
<table border=1 width=140 cellpadding=0 cellspacing=0 bordercolor=#999999>
<tr bgcolor=pink>
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a> $year_view -
$mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
</tr>
</form>
<tr align=center><td><font color=red>อา</a></td><td>จ</td><td>อ</td><td>พ</td><td>
พฤ</td><td>ศ</td><td><font color=blue>ส</font></td></tr>
<tr align=right>";
////
for($i = 0; $i < 7 ; $i++){
if($firstdays == $i){
break;
}
else{
echo"<td width=8> </td>";
}
$week=0;
}
for($i=1; $i<=$lastdays ;$i++){
if($week % 7 == 0){
echo"</tr><tr align=right>";
}
if($a == $i){
$bgcolor = "bgcolor=pink";
}else{
$bgcolor = '';
}
if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}
while($week%7!=0){
echo"<td> </td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการบันทึกตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="textfield" type="text" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">เรื่อง</td>
<td bgcolor="f2f2f2"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<td valign="top" bgcolor="f2f2f2">รายระเอียด</td>
<td bgcolor="f2f2f2"><label>
<textarea name="textarea" cols="50" rows="5" wrap="virtual"></textarea>
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2"> </td>
<td bgcolor="f2f2f2"><label>
<div align="center">
<input type="submit" name="Submit" value="บันทึก" />
</div>
</label></td>
</tr>
</table>
</form>
|
ประวัติการแก้ไข 2013-10-22 23:00:17
|
|
|
|
Date :
2013-10-22 22:58:18 |
By :
adisorn99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
076.<form name=dat_form action={$_SERVER['PHP_SELF']} method=post>
076.<form name="dat_form" action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
|
|
|
|
|
Date :
2013-10-22 23:03:23 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|