Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php include and script
Old 09-01-2005, 09:25 AM php include and script
Junior Talker

Posts: 3
Trades: 0
Hi,
I want to make a webpage, and include phpwiki in that same page. I was thinking of a setup like this:
Code:
<table>
	<tr>
		<td colspan=3>Header</td>
	</tr>
	<tr>	<td>Menu</td>
		<td><?php require("./wiki/index.php"); ?></td>
		<td>hotlinks</td>
	</tr>
	<tr>
		<td colspan=3>Footer</td>
	</tr>
</table>
The problem is that index.php from the wiki-folder doesn't specify where it's located, and that all references to other files of the wiki uses a short format. This causes the included wiki-index to be executed from the root-folder, not in /wiki.

What happens is that the script doesn't work. Do I have to manually find all includes in the wiki-script, and update the url, or is there a way to "include-this-file-but-launch-it-from-where-its-at"-kind of trick? Any help appreciated...

speck
speck is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-01-2005, 02:23 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
If php wiki is written properly, there ought to be a variable or constant you can change to do this. Have a look for some of the includes in phpwiki and see if they are hard coded or if the refer to some variable or constant. If they are hard coded you'll have to change them all, if not you can find the variable and change it to point to the /wiki directory from where you include the main page.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 09-02-2005, 12:00 PM
Junior Talker

Posts: 3
Trades: 0
Won't do any good. I have fiddled about a bit, and what I understand is that phpwikis index uses info in the url. So, a page would use wikis index like this = index.php?id=WikiPage. When I include the wikis index.php to my main index.php that info won't get passed to the correct page, so that wikiphp will open itself in full screen, and ignore my nice table and layout in main index.php... ;(
speck is offline
Reply With Quote
View Public Profile
 
Old 09-02-2005, 06:37 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
What about putting it in an iframe? Not that i've ever used them myself...
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 09-05-2005, 01:11 PM
Junior Talker

Posts: 3
Trades: 0
Yeah, I have found this to be the solution.. It's just a shame that there is no way to just include stuff neatly without any hassle. Oh, well, thanks for the input anyways
speck is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php include and script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.75942 seconds with 12 queries