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!
i was working on a little script to upload images and i noticed something strange ( but maybe usefull ).
i forgot to add an extension so my file ended up named like this "36." and strangly enough when i call it in a different page with
<img src=36.></img> it actually works..
when i remove the . so it just becomes "36" then it fails..
for me this could be usefull cause i wouldnt have to check if they upload a file with the same name but with a different extension cause it would all be named the same ( no extension )
anybody know anything about this? it seems to work..but is there anything i might be missing that could go wrong or something?
you can have
<img src=36.php></img>
and as long as you have proper headers and content in this php file it will work as well but it depends on server configuration if this file will be interpreted or just send in plain text.
extension is only important on a server side - this way server knows what to do with it: send it to the browser, parse it and send, execute etc.
for browser file extension is not important - it looks for file headers only
well so far it seems to work fine without an extension
( file is saved without on on the server but displayed propperly in the browser wen called thru a html tag )
guess i'll see what happens