![]() |
DEFINED GAME URL?
Is there a defined game url in the script somewhere?
A lot of my code uses things such as across multiple pages: So once this action is submitted Code:
$TableForm = new Form("multiform", "page/action", "post"); So if the form gets shown again using: Code:
$TableForm = new Form("multiform", "page/action", "post"); I am now at mygameurl.com/page/action/page/action = ERROR I rather not hard-code the URL. |
Try "../../page/action"? Doing so creates a relative path regardless and will go up two directories (if possible, if not, it'll stop at the root).
If this doesn't work I think there is such a thing that you were asking for (but I can't remember where to find it). |
Umm? Are you talking about something like DOMAIN.SCRIPTPATH?
I'm taking these from the inc/config.php file. I've never used these before, but if you add include("../inc/config.php"); to each page, you should be able to fetch DOMAIN and SCIPTPATH. If that doesn't work, you could still try your actual domain... though that's not ideal. Edit: Also found this $mysidia->path->getAbsolute() It should work if you've added the $mysidia = Registry::get("mysidia"); to the page. Try: $TableForm = new Form("multiform", "{$mysidia->path->getAbsolute()}page/action", "post"); |
Thanks @Wallie987
|
Yeah Wallie987 is right, the method getAbsolute() on Path object will return the absolute path of your site, and it will be useful for you.
|
All times are GMT -5. The time now is 08:43 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.