| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| PHP include help | |
|---|---|
| Tweet Topic Started: Jun 3 2005, 10:46 AM (305 Views) | |
| high elf-ZNS | Jun 3 2005, 10:46 AM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
OK I'm designing a website and I've done it all through html and css, but I recently found out about the include function for php. So I want to use it as there are going to be alot of pages on my sie and I don't fancy manually updating them each time I ad an affiliate or something new to the navigation etc. So I took the navigation out the page I've done (just the template really no content) and saved it in another file as navigation.html and saved it in a folder called content. So the link I used to it was:
and it doesn't work, the navigation is just revoved Sothen I tried saving it as navigation.php and linking in the same way to that and it still doesn't work. I've got apache, php and mysql set up and running on the computer using WAMP whih automatically configures them. Can anyone shed some light on why this isn't working for me? |
![]() |
|
| Jory | Jun 3 2005, 10:49 AM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You have to save the files as .php (So also the file that you put the include in) Try changing it to require() (works the same way) It will give you an error if something is wrong. Post the error here, might be usefull. |
![]() |
|
| high elf-ZNS | Jun 3 2005, 10:57 AM Post #3 |
|
Member
![]() ![]() ![]() ![]()
|
The require doesn't work and I've saved both files as .php WAMP is saying that all services are running, I don't get it because I don't get ay error message at all... |
![]() |
|
| Jory | Jun 3 2005, 11:01 AM Post #4 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Ok, do other php functions work?? (Just try something like <? echo 'php works'; ?> to check it if you are not sure) |
![]() |
|
| high elf-ZNS | Jun 3 2005, 11:06 AM Post #5 |
|
Member
![]() ![]() ![]() ![]()
|
Nothing, I suppose there's somehing wrong with WAMP. Do you know any free webhosts you can use php on and can you recomend a free easy to use ftp program. That way I could upload and test the code. |
![]() |
|
| Dennis | Jun 3 2005, 04:39 PM Post #6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
FTP: SmartFTP. |
![]() |
|
| Jory | Jun 4 2005, 12:27 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
For testing stuff on your local pc, you could also use phpdev. I love it ![]() (exept it won't run MySQL for me, but thats because I messed it up somehow) |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
12:53 PM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)




12:53 PM Jul 11