Page 1 of 1
Include function
Posted: Sun Jun 13, 2004 4:52 pm
by Epiphany
I followed enygma's tutorial exactly on how to do the include.
I even looked at coding from another site to make sure I had the formatting right.
I'm certain I did but it will not should the page I put in...
I tried using
<?include("left.php");?>
That didn't work, and I tried using
<?php
include ("NewMenu.php");
?>
and that didn't work either. Can anybody help me shed some light on my problem?
Thanks
Posted: Sun Jun 13, 2004 4:55 pm
by feyd
Posted: Sun Jun 13, 2004 5:22 pm
by Epiphany
Nopers, just tried and the same problem as before. Nothing appears.
If I put letters in where I would put the include or that phpinfo one you suggested, the letters appear when I open the page in IE...
When I put the include or phpinfo, the page I tried to include doesn't show up. Athe other page is is "Testing" in bold red letters...
The "Testing" page works when I open it up in IE...
Posted: Sun Jun 13, 2004 5:29 pm
by Dash
Is your page's extension .php? Are you sure you can make php pages on your server? Did you upload your page before checking if the include worked?
If you did all this and you only need an include, you could try using an SSI. (.shtml files)
Posted: Sun Jun 13, 2004 6:08 pm
by Epiphany
The extensions are PHP. My server can't use PHP which is why I'm not uploading it yet. Merely seeing if it works when I try and view it from the harddrive.
I've thought about using SSI...
Posted: Sun Jun 13, 2004 6:36 pm
by feyd
are you sure you installed php correctly, and mapped the proper mimetypes for php to execute them?
Posted: Sun Jun 13, 2004 6:37 pm
by markl999
view it from the harddrive
Just wondering, you arn't doing File->Open are you, you are accessing it via
http://localhost/foo.php (or whatever it's called) ?
Posted: Sun Jun 13, 2004 7:27 pm
by Yonderknight
You need to install a PHP server on your compute, you can't just try to test them by opening them.
Use
http://www.easyPHP.org
Posted: Sun Jun 13, 2004 7:27 pm
by snpo123
Try viewing the source of your php pages. If your php script shows up in the html, that means that php isnt installed on your computer. You have to install apache and configure it with php. that way you'll be able to test your scripts on your local machine. If you need help doing that go to the apache section of devnetwork.
Posted: Sun Jun 13, 2004 9:25 pm
by Epiphany
Oh, so I probably have it correct in on my comp. I just need to find a server (ie: i'm too lazy to install in on my comp) that supports PHP?
LoL, I feel dumb. Thanks for the help.
Happen to know of any free hosts that support PHP?
Thanks in advance.
Posted: Sun Jun 13, 2004 9:50 pm
by d3ad1ysp0rk
Not really, but I have an easy to follow guide on how to turn your machine into your own free webhost..
http://lps.no-ip.org/install.php
tell me if it helps

Posted: Sun Jun 13, 2004 10:49 pm
by Epiphany
Problem solved. Thanks guys.