My problem relates to the
php.ini file I believe, but it may be another thing.
Let us say there exists a site architecture where within the root directory there's another directory named
img along with a file named
index.php. Within the directory
img there's personal files named
index.php, to consult a picture, I'd use
My real question is, what must i alternation in
php.ini to have the ability to write
img/image.jpg rather than
Relative pathways get resolved through the internet browser, not by PHP. There's not a way to override this behavior on the internet server.
Nothing PHP can perform. You can basically do this with Apache rewrites however it makes a lot more sense to simply use absolute pathways. You shouldn't attempt to mix absolute and relative pathways since it is only going to create problems for you personally later on. Wrong with adding the '/' towards the front from the path?
Not just that, however it will confuse the hell from people attempting to debug your code that all your relative pathways have become absolute pathways in Apache.
My real question is, what must i alternation in php.ini to have the ability to write
This really is responding to your question although not the solution you want to hear. It fairly simple, let us first list the ini configurations:
And that is all. How it operates:
Prepend a php script using the ini directive. within that file, you start output loading with your personal callback function:
You can now write
include_path rather than
// slash that image that you want to write without slash
return (str_replace("img/image.jpg", "/img/image.jpg", $buffer));
since your output filter function does re-write it for you personally.
But be mindful that you are not attempting to fix the incorrect finish with this particular. General rule of hypertext references apply, see Uniform Resource Identifier (URI): Generic Syntax , Hypertext Transfer Protocol -- HTTP/1.1 and Hypertext Markup Language - 2.0 .