EmilyHF

Registered
Dec 12, 2011
3
0
51
cPanel Access Level
Reseller Owner
I'm not sure what this is, how to fix it or how it started. This is hard to explain, but I'll do my best.

If I made a new folder in my public_html called "testing", added an index.php file in there and added an HTML code to put an image in.

Example:
HTML:
<img src="images/image.png"/>
If I did that, it'd think that images/image.png is in the testing folder, so testing/images/image.png. How do I fix this? Can someone PLEASE help me. Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello :)

The example you posted is the normal behavior. Are you intending to have the images called from another location? If so, you can enter the full path. EX:

Code:
/home/username/public_html/images/test.jpg
Thank you.
 

EmilyHF

Registered
Dec 12, 2011
3
0
51
cPanel Access Level
Reseller Owner
Hello :)

The example you posted is the normal behavior. Are you intending to have the images called from another location? If so, you can enter the full path. EX:

Code:
/home/username/public_html/images/test.jpg
Thank you.
When I enter that in my code, it thinks that it's in css/home/snap/public_html/images/test.jpg
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
It seems like there is a problem with the PHP script itself. You may want to try using a test script to see if the same behavior occurs. If the issue persists, feel free to open a support ticket so we can take a closer look:

Submit A Ticket

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
I suggest contacting your web hosting provider for assistance, as it's possible there are some root-level settings that could be causing this problem.

Thank you.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I'm not sure what this is, how to fix it or how it started. This is hard to explain, but I'll do my best.

If I made a new folder in my public_html called "testing", added an index.php file in there and added an HTML code to put an image in.

Example:
HTML:
<img src="images/image.png"/>
If I did that, it'd think that images/image.png is in the testing folder, so testing/images/image.png. How do I fix this? Can someone PLEASE help me. Thank you.
When you load that index.php in your browser, and then use your browser's "view source" to see the source code, what does it show as the path to that image?