Shadowing Posted March 15, 2012 Share Posted March 15, 2012 hey guys Using IE8 i can do this <img src="c:/software/xampp/xampp/htdocs/system_lords/images/26hicon.gif" alt="26h icon" width="40" height="40" /> but in firefox it doesnt work. any ideas? It shows the alt though just not the image. Quote Link to comment Share on other sites More sharing options...
Shadowing Posted March 15, 2012 Author Share Posted March 15, 2012 well of course its showing the alt haha Quote Link to comment Share on other sites More sharing options...
trq Posted March 15, 2012 Share Posted March 15, 2012 If your planning on using that code on the web it won't work because C: is not accesible. You need to start from the root of your server, not your OS. Probably: /system_lords/images/26hicon.gif Quote Link to comment Share on other sites More sharing options...
Shadowing Posted March 15, 2012 Author Share Posted March 15, 2012 ahh thanks. that solves everything. cause yah i was wondering about that issue when i put my site on the web. Quote Link to comment Share on other sites More sharing options...
Shadowing Posted March 15, 2012 Author Share Posted March 15, 2012 that fixes all my link issues but when I use that on a required file I get this error. says i need to include the c:? Warning: require(/system_lords/header.php) [function.require]: failed to open stream: No such file or directory in C:\Software\XAMPP\xampp\htdocs\System_Lords\Guide\guide.php on line 18 Fatal error: require() [function.require]: Failed opening required './system_lords/header.php' (include_path='.;C:\Software\XAMPP\xampp\php\PEAR') in C:\Software\XAMPP\xampp\htdocs\System_Lords\Guide\guide.php on line 18 Quote Link to comment Share on other sites More sharing options...
Shadowing Posted March 15, 2012 Author Share Posted March 15, 2012 oh maybe i just cant use that when looking for files that are in the same folder. I dont understand why it would try to search in the guide folder with that link Quote Link to comment Share on other sites More sharing options...
Shadowing Posted March 15, 2012 Author Share Posted March 15, 2012 well for this situation i can do this to make it work <?php require("../header.php"); ?> Quote Link to comment Share on other sites More sharing options...
trq Posted March 15, 2012 Share Posted March 15, 2012 You have to understand the difference between server side and client side. Browsers run on the client side and can only access as far up your filesystem tree as the servers root. PHP on the other hand runs server side and can (generally) access any file on the computer the server is running on. Quote Link to comment Share on other sites More sharing options...
kicken Posted March 15, 2012 Share Posted March 15, 2012 You can read through this other thread for a rather in-depth discussion of web vs filesystem roots and when/where to use them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.