MAMP Help

Joined
Aug 15, 2006
Messages
483
Reaction score
13
Points
18
Location
Abu Dhabi, United Arab Emirates
I have installed MAMP to help me test my sites that I am doing using PHP so I don’t have to keep uploading/reuploading to my FTP. It has all installed OK etc, and it is connecting to the local host and displaying my pages correctly through Firefox, however, the ‘includes’ that I have in my index page for example, do not do not display.

Does anyone know how to make it possible to display the includes as well, so it looks just like it does when I upload to my FTP?

It is only simple pieces of PHP code that I am using where I want the header/footer/navigation etc to display:

<?php include('includes/header.php'); ?>

Also, is it not possible to test in Safari using localhost? All I get is the PHP code from the file when I open in Safari.

Thanks in advance
Liam
 

Del


Joined
Dec 24, 2006
Messages
901
Reaction score
15
Points
18
Location
N. Ireland
Your Mac's Specs
Mac Pro 2xQuad core 2.8GHZ
Does anyone know how to make it possible to display the includes as well, so it looks just like it does when I upload to my FTP?

It is only simple pieces of PHP code that I am using where I want the header/footer/navigation etc to display:

<?php include('includes/header.php'); ?>

that should work, but heres what i do

Code:
<?php
        @include_once("includes/rhlogos.html");
      ?>

Also, is it not possible to test in Safari using localhost? All I get is the PHP code from the file when I open in Safari.

Thanks in advance
Liam

havent reinstalled mamp since i upgraded to leopard but this should work

http://localhost/foldername/index.php
 
OP
L
Joined
Aug 15, 2006
Messages
483
Reaction score
13
Points
18
Location
Abu Dhabi, United Arab Emirates
Hi Del,

Thanks for the reply - Unfortunately I still cant get the includes displaying, and still can't get the site working in Safari.

Any ideas?

Cheers
Liam
 

Del


Joined
Dec 24, 2006
Messages
901
Reaction score
15
Points
18
Location
N. Ireland
Your Mac's Specs
Mac Pro 2xQuad core 2.8GHZ
Hi Del,

Thanks for the reply - Unfortunately I still cant get the includes displaying

What does the error log say?

and still can't get the site working in Safari.

Any ideas?

Cheers
Liam

You did run MAMP and start the Apache server before you tried to view the site, didnt you??
 

Del


Joined
Dec 24, 2006
Messages
901
Reaction score
15
Points
18
Location
N. Ireland
Your Mac's Specs
Mac Pro 2xQuad core 2.8GHZ

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top