PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
An error has occured in script 'C:\wamp\www\newWRT\includes\header.php' on line 26:
include(http://localhost/newWRT/newWRT/includes/navigation/work-static.inc) [function.include]: failed to open stream: no suitable wrapper could be found
Date/Time:7-16-2007 11:00:01
three different protocols, i.e. different methods of accessing the data. But yet in all three cases I can use the same function fopen or fread or include or file_get_contents or ....
The code units that make this little magic possible are called url wrappers. They are wrapped around the actual implementation for retrieving from an url (or sending to an url) to make them all more or less "appear to be the same".
psurrena wrote:I'm including through HTTP because I have yet to get an include to work while using mod_rewrite without it.
I don't understand what you're trying to achieve but it sounds like yet another good reason not to use http://... for this include.
I use http because when using mod_rewrite, relative includes where the file was in a subdirectory would not load since the path was relative to a "fake" URL.
So my two questions are:
1) Why is http bad?
2) What should a proper include look like? When I use
If you access a file through the local filesystem relative paths are relative to the current working directory (cwd) which is not so much affected by mod_rewrite.
In case of doubt use