Closed Thread Icon

Topic awaiting preservation: Php template not working... (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=11916" title="Pages that link to Topic awaiting preservation: Php template not working... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Php template not working... <span class="small">(Page 1 of 1)</span>\

 
YoBoyE
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2001

posted posted 10-21-2001 04:15

I've decided to begin to develop my site in php, and i started by doing the php template at the guru's network. I copied it exactly, yet it doesn't work. See for yourself at http://www.yocentral.net/index.php . for some reason it like...isnt executing the php or something, because when you view source you can see the php stuff. Thanks in advance.

Eric Hesterman

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 10-21-2001 04:56

If you are seeing the PHP code it is not parsing .php your server may be set up to parse .php3 files instead, or you might not have PHP installed on your server. You shoudl contact your server admin in order to determine what is going on here.

YoBoyE
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2001

posted posted 10-21-2001 05:07

yeah, i thought maybe it was a different file extension, so i tried to rename to .php3 and it made it index.php3.txt, assumingly because it hasn't associated any php3 extensions on my comp, and yes, php is installed, or so i was told. So i guess i have to figure out how to rename it to where it will work...any suggestions....thanks in advance

Eric Hesterman

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 10-21-2001 19:41

What server are you using?

Are you the server, or do you have a host. If you own the server you will need to RTFM and if someone else is running it, you will need to contact them.

YoBoyE
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2001

posted posted 10-21-2001 19:59

I contacted the server administrator guy, and he had to configure some stuff, so now it works, http://www.yocentral.net/index.php thanks everyone

Eric Hesterman

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 10-21-2001 20:19

Don't take that template tutorial to heart. I have modified my way of coding much since I wrote that.

I have learned about global variables, and have figured out what is easier and what is not.

My current templates resemble

code:
<? $title = "page title"; ?>
<? include($DOCUMENT_ROOT . "/templates/header.php"; ?>

Actual Page Content

<? include($DOCUMENT_ROOT . "/templates/footer.php"; ?>



My files would then resemble,

head

code:
<html>
<head>
<title><?echo "$title"; ?></title>
</head>
<body>



foot

code:
</body>
</html>



Don't be afraid to mess around with this stuff it can be exciting.

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 10-22-2001 17:11

Mage - time to update the tute!

YoBoyE
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2001

posted posted 10-23-2001 00:26

mage, what are some other uses of the echo command, and what are some advantages of it? also are there places that explain or give tutorials or examples with the echo command.

Eric Hesterman

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-23-2001 00:36

echo() function -- Output one or more strings...


WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 10-23-2001 19:14

http://www.gurusnetwork.com/tutorials/approval/templatedesign2/index.shtml

I did a new one over at the GN which outlines a different way of doing the templates. Wondering if you wanted to go through it and review it for me YoBoyE.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-23-2001 19:30

echo and print are virtually identical. However there is a difference.

echo is not actually a function but a language construct.
print is a function and returns a value when used.

echo "Hello World"; is perfectly valid. It does not return a value.
$ret = print "Hello World"; Actually returns 1.

Slightly better explaniation here

<edit by="WarMage">Fixed URL</edit>



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

[This message has been edited by WarMage (edited 10-23-2001).]

YoBoyE
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2001

posted posted 10-23-2001 22:49

oh, ok, i understand now, thanks everyone.

Eric Hesterman

« BackwardsOnwards »

Show Forum Drop Down Menu