php help
i just started to learn some php and the book I have does not tell you how to load other documents. This is what i want to do. I want to take for instance say i right a document called midpage.pg, this would be part of my page from the < body > tag down to the < /body > tag and it would automagically write that page, then move on to loading the bottom part of the page. How would I do this? I need it for the tutorial maker script I am writing. Thanks in advanced.
My Homepage | My Forums Please Register | Google
The OSLib | Personal Site/Blog | /Dev/Nulled Hosting | WoW Linux Petition | The Wildcard - My IRC Network
The ''include'' or ''require'' functions allow you to import other documents and insert them into the current document. Usually you use this with other PHP pages but I expect you can just insert an HTML document too.
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
check the documentation on http://www.php.net/ its simply a great learning source if you already are into programming
i also recommend the chm help file you can find there if you work on windows
i also recommend the chm help file you can find there if you work on windows
http://mitglied.lycos.de/lousyphreak/
I want it to automatically import it and write it. Cus the file I am loading is just a bunch of tables that will constantly be updated. Making it without any functions in it will allow me to write to it easier. How would i do that? Some one on phpbb.com told me to use file_get_contents but thats not a function.
My Homepage | My Forums Please Register | Google
My Homepage | My Forums Please Register | Google
The OSLib | Personal Site/Blog | /Dev/Nulled Hosting | WoW Linux Petition | The Wildcard - My IRC Network
ok it is a function but 1and1 does not have it enabled or do not have the right version of php.
The OSLib | Personal Site/Blog | /Dev/Nulled Hosting | WoW Linux Petition | The Wildcard - My IRC Network
Why don''t you just use include() like Kylotan suggested? If you tried it you''d see that it works (if I understand you correctly).
Let''s say you have a separate HTML file just for the body area, since that seems to be what you''re saying. Then in the PHP file, you''d have this:
Get it?
~CGameProgrammer( );
-- Post screenshots of your projects. There''s already 134 screenshot posts.
Let''s say you have a separate HTML file just for the body area, since that seems to be what you''re saying. Then in the PHP file, you''d have this:
</head><body><? include(''Body.html''); ?></body></html>
Get it?
~CGameProgrammer( );
-- Post screenshots of your projects. There''s already 134 screenshot posts.
~CGameProgrammer( );
Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement