Webmaster Malaysia Forum  


Go Back   Webmaster Malaysia Forum > Website Design & Development > Website Programming

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Assalamualaikum
Old
  (#1 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
Smile Assalamualaikum - 16-04-2008, 09:13 AM

Lama x masuk dalam forum ni...
actually just a simple question maybe bg yg expert dlm PHP memang tau jawapan nye.. so harap dapat membantu...

Mukadimah:
Dari ASP --> ASP.Net & skang ni baru nak menjinak kan diri dalam PHP ni..
maybe bg webmaster yg lain tergelak ngan keterbalikan cara saya belajaQ...

Maklumat
Windows SERVER 2003 ENT SP2
IIS 6
MS SQL V8.0
Mozilla firefox2, Ie7
WAMP 2 "Apache2,MySQL5,PHP5"PHPmyadmin,SQLiteManager"
terdapat 4 Localhost di berlainan DRIVE
Text Editor Dreamweaver,Notepad++,Notepad

Masalah
Wamp server dah jalan ngan cantik "alahamdullilah"
akan tetapi pabila saya memulakan kerja utk membina web "PHP"
data atau value yg sepatutnya keluar contoh simple calculation / tarikh tak keluar..

Solution
Apa yang salah?
Dimana yang salah?
Apa yang patut saya buat?
Kat mana patut saya check?

So harap benar boleh membantu

Contoh
Link contoh PHP yang bermasalah

Mail
Izzuan@linuxmail.org
Dehackers@linuxmail.org
Dehackerz@gmail.com
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Super Moderator
mysticmind will become famous soon enough mysticmind will become famous soon enough
 
mysticmind's Avatar
 
Status: Offline
Posts: 2,485
Join Date: Jun 2001
Location: Mystic Kingdoms
Rep Power: 136
16-04-2008, 09:42 AM

sepatutnya kerja kod kenalah ada kodnya sekali, baru boleh dibantu.

saya rasa, berkemungkinan berkaitan Register Global = off .
  Send a message via Yahoo to mysticmind  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
reply
Old
  (#3 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
reply - 16-04-2008, 04:07 PM

Ahaks...
dah register_globals = On dah lama di on kan nye..
tapi sedey nye cam x leh gak aje...

ok ok coding nye ni :

<?
// Hello Dunia Ku.
// Dehackers™ Works.
$tarikh = date('dd/M/Y');
// cetakkan tarikh dalam page.
echo "Tarikh Hari ini : $tarikh ";
?>
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
16-04-2008, 04:48 PM

dan 1 lagi contoh yang tak kuaQ value

upload_form.html
<HTML>
<HEAD>
<TITLE>Upload File</TITLE>
</HEAD>
<BODY>
<H1>Upload A File</H1>
<FORM METHOD="POST" ACTION=" do_upload.php" ENCTYPE="multipart/form-data">
<p><strong>File to Upload:</strong><br>
<input type="file" NAME="img1" SIZE="30"></p>
<p><INPUT type="submit" NAME="submit" VALUE="Upload File"></p>
</FORM>
</BODY>
</HTML>


do_upload
<?

if ($_FILES[img1] != "") {

@copy($_FILES[img1][tmp_name],"http://www.fce.uitm.edu.my/Izzuan/wamp/bin/apache/apache2.2.8/htdocs".$_FILES[img1] [name])
or die("Couldn`t copy the file.");

} else {

die("No input file specified");
}

?>
<html>
<head>
<title>Successful File Upload</title>
</head>
<body>
<H1>Success!</H1>

<p>You sent: <? echo_FILES[img1] [name]; ?>, a <? echo $_FILES[img1][size]; ?> byte file with a mime type of <? echo $_FILES[img1][type]; ?>.</p>

</body>
</html>

kalau nak nengok link kat sini
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Inspired Webmaster
amaRDaniel is on a distinguished road
 
amaRDaniel's Avatar
 
Status: Offline
Posts: 103
Join Date: Sep 2005
Location: shah alam
Rep Power: 37
16-04-2008, 08:13 PM

Quote:
Originally Posted by Dehackers View Post
Ahaks...
dah register_globals = On dah lama di on kan nye..
tapi sedey nye cam x leh gak aje...

ok ok coding nye ni :

<?
// Hello Dunia Ku.
// Dehackers™ Works.
$tarikh = date('dd/M/Y');
// cetakkan tarikh dalam page.
echo "Tarikh Hari ini : $tarikh ";
?>
result kat pc aku kuar gini..
Tarikh Hari ini : 1616/Apr/2008

so mungkin yg "dd" dua ekor tu.. ko buang tinggalkan sekor jer..
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Inspired Webmaster
amaRDaniel is on a distinguished road
 
amaRDaniel's Avatar
 
Status: Offline
Posts: 103
Join Date: Sep 2005
Location: shah alam
Rep Power: 37
16-04-2008, 08:14 PM

Quote:
Originally Posted by Dehackers View Post
dan 1 lagi contoh yang tak kuaQ value

upload_form.html
<HTML>
<HEAD>
<TITLE>Upload File</TITLE>
</HEAD>
<BODY>
<H1>Upload A File</H1>
<FORM METHOD="POST" ACTION=" do_upload.php" ENCTYPE="multipart/form-data">
<p><strong>File to Upload:</strong><br>
<input type="file" NAME="img1" SIZE="30"></p>
<p><INPUT type="submit" NAME="submit" VALUE="Upload File"></p>
</FORM>
</BODY>
</HTML>


do_upload
<?

if ($_FILES[img1] != "") {

@copy($_FILES[img1][tmp_name],"http://www.fce.uitm.edu.my/Izzuan/wamp/bin/apache/apache2.2.8/htdocs".$_FILES[img1] [name])
or die("Couldn`t copy the file.");

} else {

die("No input file specified");
}

?>
<html>
<head>
<title>Successful File Upload</title>
</head>
<body>
<H1>Success!</H1>

<p>You sent: <? echo_FILES[img1] [name]; ?>, a <? echo $_FILES[img1][size]; ?> byte file with a mime type of <? echo $_FILES[img1][type]; ?>.</p>

</body>
</html>

kalau nak nengok link kat sini
yg nie ok jer..
hak hak hak..
Quote:
Success!

You sent: , a byte file with a mime type of .
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
17-04-2008, 07:42 AM

alamak amaRDaniel....
me dah tinggal kan D tu sorang2 tapi still problem...
thats mean masalah coding tu x berapa nak timbul..
tapi masalah value yg spatutnye kuaQ tak kuaQ...
PHP me setting senget kot?
tapi mana senget nye yerk?
mueheheheh
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Inspired Webmaster
amaRDaniel is on a distinguished road
 
amaRDaniel's Avatar
 
Status: Offline
Posts: 103
Join Date: Sep 2005
Location: shah alam
Rep Power: 37
17-04-2008, 11:00 PM

Quote:
Originally Posted by Dehackers View Post
alamak amaRDaniel....
me dah tinggal kan D tu sorang2 tapi still problem...
thats mean masalah coding tu x berapa nak timbul..
tapi masalah value yg spatutnye kuaQ tak kuaQ...
PHP me setting senget kot?
tapi mana senget nye yerk?
mueheheheh
owh tu susah ler nak tahu mana yg senget tu bey..
aku test code tu kat local pc jer.. ok jer..
try ler tanyal awek2 cun compscience kat uitm tu..
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#9 (permalink))
Super Moderator
mysticmind will become famous soon enough mysticmind will become famous soon enough
 
mysticmind's Avatar
 
Status: Offline
Posts: 2,485
Join Date: Jun 2001
Location: Mystic Kingdoms
Rep Power: 136
18-04-2008, 01:07 AM

PHP Code:
<p>You sent: <? echo_FILES[img1] [name]; ?>, a <? echo $_FILES[img1][size]; ?> byte file with a mime type of <? echo $_FILES[img1][type]; ?>.</p>
nih betul ker ?
<? echo_FILES[img1] [name]; ?>

ke sepatutnya :
<? echo $_FILES[img1] [name]; ?>

*lama tak main php nih, kekok dah
  Send a message via Yahoo to mysticmind  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#10 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
18-04-2008, 07:58 AM

ahaks...
coding tu tersilap skit but it still wont work...
me rasa ada prob ngan PHP setting je...

arghh sedey la..
PHP setting lari laa..
nak kejaQ tak reti..
heheheh
cam ne yerk?
leh la bantu....
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#11 (permalink))
Super Moderator
mysticmind will become famous soon enough mysticmind will become famous soon enough
 
mysticmind's Avatar
 
Status: Offline
Posts: 2,485
Join Date: Jun 2001
Location: Mystic Kingdoms
Rep Power: 136
18-04-2008, 11:32 AM

<?
// Hello Dunia Ku.
// Dehackers™ Works.
$tarikh = date('dd/M/Y');
// cetakkan tarikh dalam page.
echo "Tarikh Hari ini : $tarikh ";
?>

yang nih pun tak keluar ke?
kalau tak kuar.. ada prob ngan server la kot?
dah try kat lain2 hosting?
  Send a message via Yahoo to mysticmind  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#12 (permalink))
Novice Webmaster
Dehackers is on a distinguished road
 
Status: Offline
Posts: 13
Join Date: Aug 2007
Location: UiTM Shah Alam Selangor
Rep Power: 0
18-04-2008, 09:44 PM

Quote:
Originally Posted by mysticmind View Post
<?
// Hello Dunia Ku.
// Dehackers™ Works.
$tarikh = date('dd/M/Y');
// cetakkan tarikh dalam page.
echo "Tarikh Hari ini : $tarikh ";
?>
yang ni memang tak kuaQ
tu arr masalah ngan SERVER but