Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

90 users online



Funny problem...

Funny problem...

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
TylerDurden

TylerDurden

Cheeky!
Status: Offline!

Funny problem...

I was copying, word for word, a tutorial from a magazine. It didn't work sadly, so I checked the file that was on the magazine disc, copied the the file, that is exactly the same as the one I've written, and gave it a different name. So then I checked it again, and the file dopied from the disc, worked like a charm, but the one I'd written (it is exact, letter for letter, I triple-checked), doesn't work at all!

It isn't a real problem, but I was wondering if someone else knew about htis sort of problem... Or maybe encountered something yourself.

___________________

http://www.xs4all.nl/~wiewer/sam_pixelart.jpg

Rad

Rad

thinking of something witty to put here
Status: Offline!

Probably has to do with different line breaks and the way your editor handles them. Did you get any errors?

TylerDurden

TylerDurden

Cheeky!
Status: Offline!
Originally posted by Rad:

Probably has to do with different line breaks and the way your editor handles them. Did you get any errors?

Well the funny thing is, I've edited the copied file in the same way, as my original file (the one I typed), but it still gets the same results... (I'm using Dreamweaver 8 btw...)

What it is, is basically a php file that shows some data out of a list, no problems. But my own file shows nothing, and the source in firefox only gives me a <html></html> output, but the other file works as if it's not the same. So, same words, exact same layout and markups... It's keeping me up at 1 in the night Eek

___________________

http://www.xs4all.nl/~wiewer/sam_pixelart.jpg

TheClincher

TheClincher

Lost in Berkeley, CA
Status: Offline!

Does you have PHP support

___________________

There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.

TylerDurden

TylerDurden

Cheeky!
Status: Offline!
Originally posted by TheClincher:

Does you have PHP support

Yes, otherwise the second one wouldn't work either, would it Wink

___________________

http://www.xs4all.nl/~wiewer/sam_pixelart.jpg

BigToach

BigToach

Neversidian
Status: Offline!

are the two files in the same directory with the same error_reporting levels?

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

kiswa

kiswa

Yeah, kiswa.
Status: Offline!

I'm curious to see if this can be replicated. Could you attach the two files so we can compare them?

___________________

www.kiswa.com
My attempt at articles for Neverside CodeBase: Part 1 Part 2 Part 3
(. )v( ·) <- The Webstandards Owl

Rad

Rad

thinking of something witty to put here
Status: Offline!

Make sure display_errors is set to on in your php.ini, and that error_reporting is at E_ALL.

TylerDurden

TylerDurden

Cheeky!
Status: Offline!

I did error_reporting(E_ALL); but nothing... I'll attach the files, see if you can see something. It might be just a single comma or something, but I'm sure I wouldn't have missed it... Even with the error reporting on, it still puts out only <html></html> in Firefox...

The test.php file is the one that is working properly...

Attachments:

index.php (Download) 2.95 Kb, 40 views

test.php (Download) 2.97 Kb, 31 views

___________________

http://www.xs4all.nl/~wiewer/sam_pixelart.jpg

Last edited by TylerDurden, November 11th, 2005 12:09 AM (Edited 1 times)

Samurai_Zero

Samurai_Zero

Procrastination Guru
Status: Offline!

Your problem is simple, you didn't type it exactly the same. On line 59 of index.php, the code is as follows:

Code:

if {$result2 = mysql_query($sql)) {

When in fact it should be as follows:

Code:

if ($result2 = mysql_query($sql)) {

Take note of the first character after if. You got a curlie bracket instead of a parathesis.

Other than that, there might be more typos but I'm too lazy to check it any more than I already have. Or to run the script @ localhost. Because starting up my server takes 15 seconds too long.

___________________

Bored? Join us at #Central on irc.Neverside.com

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0092 seconds.