|
Author |
Message |
fgidigi
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 07 Sep 2003
Posts: 16
|
Posted:
Sun Sep 07, 2003 12:50 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Hi there,
I'm a newbee, I don't know much about php, so i am learning the basics. I got my 'hello world' test working.
Now I wanna display (echo) the contents of another file {for instance a text file, php or htm - file} into let's say the middle of an excisting htm file, using php.
I tried the test with 'inc' [which i read in the tutorial] but did not succeed.
can someone help me out?
thank you / Figidigi |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by fgidigi Find all posts by fgidigi](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sun Sep 07, 2003 1:24 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun Sep 07, 2003 1:47 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
You'll have to rename your .html file to something.php, and then put this code where you want to echo the other file:
Code: | <?php include ('name_of_other_file.php_or_html_or_whatever'); ?> |
|
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
SfCommand
Senior WebHelper
![Senior WebHelper Senior WebHelper](images/rank_3.gif)
![](http://home.miguel.me.uk/pics/devil.png)
Joined: 10 Nov 2002
Posts: 143
Location: UK
|
Posted:
Sun Sep 07, 2003 2:01 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by SfCommand Find all posts by SfCommand](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
fgidigi
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 07 Sep 2003
Posts: 16
|
Posted:
Sun Sep 07, 2003 2:24 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Daniel...
* sigh * i've been trying so long and hard before I used your forum and I felt like a moron for not succeeding.
The thing was ... i kept using the HTM file as a basis.
because manuals told me it was INBEDDED in htm, so I named mine test.htm.
In that test - file I tried to put the php script ... WRONG, me silly cow.
your first phrase was essential! I had to rename the extension into php
then it would work...
I am really really really happy - finally I see some php results.
Great and thanx for writing so clearly.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
figidigi |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by fgidigi Find all posts by fgidigi](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun Sep 07, 2003 2:27 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Hey, I know what it feels like to spend hours working on a problem only to find out something simple is wrong. You feel like banging your head against a brick wall ![Very Happy](/forums/images/smilies/icon_biggrin.gif) |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.117006 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |