Php href link question

OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
If you could post the full length code, we can have a full picture of what's wrong. Otherwise, everything is a shot in the dark my friend.
Ok so this is main php of page
PHP:
<TABLE border="0" width="500" align="center">
<TR background="images/tablebg1.png">
 <TD class="niebieska" colspan="8"><center>&nbsp;</TD>
 </TR>
<TR background="images/tablebg3.png">
 <TD><center>&nbsp;<b>Look</b></TD>
 <TD><center>&nbsp;<b>Name</b></TD>
 <TD><center>&nbsp;<b>Level</b></TD>
</TR>


<TR background="images/tablebg2.png">
  <TD><center>&nbsp;<IMG SRC="images/outfits/294.png" BORDER="0"></center></TD>  
 <TD><center>&nbsp;<a style="text-decoration: none" href="..\quest\questone.php"><font color="white" size="2"><b>Quest</b></font></a></center></TD>
  <TD><center>&nbsp;<b>1</b></center></TD>  
</TR>
</table>
And this is second page when you click on the 'Quest' which doesnt load template
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
PHP:
<TR background="images/tablebg2.png">
  <TD><center>&nbsp;<IMG SRC="images/outfits/294.png" BORDER="0"></center></TD> 
 <TD><center>&nbsp;<a style="text-decoration: none" href="../quest/questone.php"><font color="white" size="2"><b>Quest</b></font></a></center></TD>
  <TD><center>&nbsp;<b>1</b></center></TD> 
</TR>
</table>
is "../quest/questone.php" the correct path? Try that one out and see what it does.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
PHP:
<TR background="images/tablebg2.png">
  <TD><center>&nbsp;<IMG SRC="images/outfits/294.png" BORDER="0"></center></TD>
<TD><center>&nbsp;<a style="text-decoration: none" href="../quest/questone.php"><font color="white" size="2"><b>Quest</b></font></a></center></TD>
  <TD><center>&nbsp;<b>1</b></center></TD>
</TR>
</table>
is "../quest/questone.php" the correct path? Try that one out and see what it does.
path is correct thats why it loads code but it doesnt load template so it means path is fine.
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
What are the outputs of your log files? Or any actions occurring when you press the button.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
What are the outputs of your log files? Or any actions occurring when you press the button.
questone.php:4 GET http://localhost/monsters/sorttable.js 404 (Not Found)
questone.php:20 GET http://localhost/monsters/images/outfits/294.png 404 (Not Found)
questone.php:28 GET http://localhost/monsters/images/aukcje/2675.png 404 (Not Found)
questone.php:29 GET http://localhost/monsters/images/aukcje/2787.png 404 (Not Found)
questone.php:30 GET http://localhost/monsters/images/aukcje/2144.png 404 (Not Found)
questone.php:31 GET http://localhost/monsters/images/aukcje/2182.png 404 (Not Found)
questone.php:39 GET http://localhost/monsters/images/aukcje/2148.png 404 (Not Found)
questone.php:40 GET http://localhost/monsters/images/aukcje/1111.png 404 (Not Found)
questone.php:84 GET http://localhost/monsters/images/outfits/122.png 404 (Not Found)
questone.php:1 GET http://localhost/monsters/layouts/dbiw/images/others/homepage16.png 404 (Not Found)
Ofc error 4,20,28,39,30,31,39,40,84 i just havent added monster sprites yet so you can ignore them they will disappear once i add them. So it just shows that everything is declared just fine so i guess there is something that we miss important. I feel it have to do something with index.php, we need to add something like this '/^news\/archive\/?$/' => array('subtopic' => 'newsarchive'),
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
questone.php:4 GET http://localhost/monsters/sorttable.js 404 (Not Found)

It can't find the script itself, so there's no way to load it, which is causing the error. It's due to the link's path or your root dir path. Do you have the root dir set correctly in config.php, and are sure that the path to load sorttable.js is correct? Cause it isn't right now.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
questone.php:4 GET http://localhost/monsters/sorttable.js 404 (Not Found)

It can't find the script itself, so there's no way to load it, which is causing the error. It's due to the link's path or your root dir path. Do you have the root dir set correctly in config.php, and are sure that the path to load sorttable.js is correct? Cause it isn't right now.
Ofc it set correctly what type of question is that if it wont be set correctly website wont even work. It effects only this new page.
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
That's not true. It's telling you there in the logs that it cannot find the file. It is not set correctly.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
That's not true. It's telling you there in the logs that it cannot find the file. It is not set correctly.
So it if root would be wrong whole website wont work...
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
I'm not talking about the root directory. I'm talking about the directory given in the script. I know that sometimes it won't load correctly without a full path to the file. Instead of linking it like "../path/to/script.php" try something like "/var/www/myacc/path/to/script.php" instead. That way, there would be no overlapping in the file's path, and the API can find it.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
I'm not talking about the root directory. I'm talking about the directory given in the script. I know that sometimes it won't load correctly without a full path to the file. Instead of linking it like "../path/to/script.php" try something like "/var/www/myacc/path/to/script.php" instead. That way, there would be no overlapping in the file's path, and the API can find it.
This path is for winscp im doing it on localhost. And it doesnt work anyway. I know there is smarter solution for it since i have paid some people to do some menus long time ago in my website and they always had to edit index.php like item menu it have same structure mainpage/secondpage
PHP:
'/^items\/legs\/?$/' => array('subtopic' => 'items', 'category' => 'legs'),/code]
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,088
Reaction score
2,149
This path is for winscp im doing it on localhost. And it doesnt work anyway. I know there is smarter solution for it since i have paid some people to do some menus long time ago in my website and they always had to edit index.php like item menu it have same structure mainpage/secondpage
PHP:
'/^items\/legs\/?$/' => array('subtopic' => 'items', 'category' => 'legs'),/code]
Trying something simple like changing the 1 or 2 lines of code that Aeluu is suggesting doesn't seem unreasonably hard, difficult, or time consuming.
Instead of arguing semantics, why don't you take 3 minutes and try his suggestion?
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
Trying something simple like changing the 1 or 2 lines of code that Aeluu is suggesting doesn't seem unreasonably hard, difficult, or time consuming.
Instead of arguing semantics, why don't you take 3 minutes and try his suggestion?
Read again sir
This path is for winscp im doing it on localhost. And it doesnt work anyway. I know there is smarter solution for it since i have paid some people to do some menus long time ago in my website and they always had to edit index.php like item menu it have same structure mainpage/secondpage
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,088
Reaction score
2,149
Read again sir
This path is for winscp im doing it on localhost. And it doesnt work anyway. I know there is smarter solution for it since i have paid some people to do some menus long time ago in my website and they always had to edit index.php like item menu it have same structure mainpage/secondpage
Learn how to be helped.
"I've tried nothing you've asked and the problem is still occurring!"
Well? I wonder why.

Let's take a gander at the files you posted here.

Code:
background="layouts/dbiw/images/others/homepage16.png">
background="images/tablebg1.png"> 
background="images/tablebg2.png"> 
src="images/outfits/294.png"> 
background="images/tablebg3.png"> 
src="images/outfits/294.png"> 
src="images/aukcje/2675.png"> 
src="images/aukcje/2787.png"> 
src="images/aukcje/2144.png"> 
src="images/aukcje/2182.png"> 
src="images/aukcje/2148.png"> 
src="images/aukcje/1111.png"> 
src="images/aukcje/1111.png"> 
src="images/aukcje/1111.png"> 
background="images/tablebg2.png"> 
src="images/outfits/122.png"> 
src="images/aukcje/2675.png"> 
src="images/aukcje/2787.png"> 
src="images/aukcje/2144.png"> 
src="images/aukcje/2182.png"> 
src="images/aukcje/2148.png"> 
src="images/aukcje/1111.png"> 
src="images/aukcje/1111.png"> 
src="images/aukcje/1111.png">
Code:
background="images/tablebg1.png">
background="images/tablebg3.png">
background="images/tablebg2.png">
SRC="images/outfits/294.png"
href="..\quest\questone.php">
The above is all of the 'links'.
The link in question is the very last one I posted.
Red is original. Green is suggested changes.

Now.. what do we see?
Oh! Wow. He changed the "\\" to "//".
It's almost like.. gasp! The.. the link.. the link is wrong?!
How could that be?! You've already tried nothing, and nothing has been resolved?!
Wow what a coincidence.
--------
So yes indeed, and I quote.
Read again sir
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
Learn how to be helped.
"I've tried nothing you've asked and the problem is still occurring!"
Well? I wonder why.

Let's take a gander at the files you posted here.

Code:
background="layouts/dbiw/images/others/homepage16.png">
background="images/tablebg1.png">
background="images/tablebg2.png">
src="images/outfits/294.png">
background="images/tablebg3.png">
src="images/outfits/294.png">
src="images/aukcje/2675.png">
src="images/aukcje/2787.png">
src="images/aukcje/2144.png">
src="images/aukcje/2182.png">
src="images/aukcje/2148.png">
src="images/aukcje/1111.png">
src="images/aukcje/1111.png">
src="images/aukcje/1111.png">
background="images/tablebg2.png">
src="images/outfits/122.png">
src="images/aukcje/2675.png">
src="images/aukcje/2787.png">
src="images/aukcje/2144.png">
src="images/aukcje/2182.png">
src="images/aukcje/2148.png">
src="images/aukcje/1111.png">
src="images/aukcje/1111.png">
src="images/aukcje/1111.png">
Code:
background="images/tablebg1.png">
background="images/tablebg3.png">
background="images/tablebg2.png">
SRC="images/outfits/294.png"
href="..\quest\questone.php">
The above is all of the 'links'.
The link in question is the very last one I posted.
Red is original. Green is suggested changes.

Now.. what do we see?
Oh! Wow. He changed the "\\" to "//".
It's almost like.. gasp! The.. the link.. the link is wrong?!
How could that be?! You've already tried nothing, and nothing has been resolved?!
Wow what a coincidence.
--------
So yes indeed, and I quote.
You think i didnt tried to change \ \ to / / ? I tried every possible path. I tried
../monsters/insets.php
..\monsters\insets.php
./monsters/insets.php
.\monsters\insets.php
/var/www/myacc/quest/questone.php
\var\www\myacc\quest\questone.php
then i tried every possible path from google ideas, nothing helped. Its annoying to see people with ideas that i already tried and they insulting me when idea was already tried. Your comment is just useless to be honest.
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,088
Reaction score
2,149
You think i didnt tried to change \ \ to / / ? I tried every possible path. I tried
../monsters/insets.php
..\monsters\insets.php
./monsters/insets.php
.\monsters\insets.php
/var/www/myacc/quest/questone.php
\var\www\myacc\quest\questone.php
then i tried every possible path from google ideas, nothing helped. Its annoying to see people with ideas that i already tried and they insulting me when idea was already tried. Your comment is just useless to be honest.
It's not useless, because you never said you tried it, and then 'this' is the result.
The people here are trying to help, and if you don't try their suggestion and post the result, whether good or bad, it doesn't help them help you.
If it's something simple like changing \\ to //, then fine. Done and easy.
If it doesn't solve the issue, but instead shows a new error, or even the same error, then we are making progress to a solution.

I'm not going to bother posting again, since I have nothing to contribute to the actual solution beyond a simple plea for you to make an effort in helping those whom are trying to help you.

Cheers,
Xikini
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
It's not useless, because you never said you tried it, and then 'this' is the result.
The people here are trying to help, and if you don't try their suggestion and post the result, whether good or bad, it doesn't help them help you.
If it's something simple like changing \\ to //, then fine. Done and easy.
If it doesn't solve the issue, but instead shows a new error, or even the same error, then we are making progress to a solution.

I'm not going to bother posting again, since I have nothing to contribute to the actual solution beyond a simple plea for you to make an effort in helping those whom are trying to help you.

Cheers,
Xikini
Maybe its my bad for not saying what i have tried. But highly skilled person would be able to tell whats wrong because in my thread i said 'im not sure how to use href' so it means i have already tried multiple ways and non of them helped and end up using 'THIS' href link. Maybe i write encrypted sentences i dont know. But anyway i think @slawkens should know the answer since hes the top tier programmer related with websites and especially with myacc.
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
I just think you need to stop being so ignorant and read this for like 30 minutes. It'll solve your problem, the solution is on that page.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
70
Reaction score
6
I just think you need to stop being so ignorant and read this for like 30 minutes. It'll solve your problem, the solution is on that page.
It says create fileDir.php. but how am i suppose to create new php when it needs to declare path of this new php to be able to get any prints from it so it doesnt make sense its like you need 1usd but to get 1usd you need 1usd. And calling people ignorant when you giving useless information all over again is kinda stupid and im telling like million times path was editing several times. The path im using right know was given by people from php support forum. I dont think you have enough experience with it and you just guessing atm and wasting everyones time.
 
Top