|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-10-07 20:10 UTC] janitor at wonkavision dot net
Description:
------------
The other day I spent 2 hours trying to find a bug in my code becasue imagecreatefromjpeg() requires absolute path and the docs dont make it clear that you cannot use a relative path. There is a user comment about this, but I think it probably needs to be in the docs.
Thanks for the help!
Reproduce code:
---------------
imagecreatefromjpeg("nextdir/filename.jpg");
it should be something like
imagecreatefromjpeg("var/www/project/nextdir/filename.jpg");
Expected result:
----------------
no output
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 11:00:01 2025 UTC |
I think, its not a bug. instead: imagecreatefromjpeg("nextdir/filename.jpg"); use dot at the beggining, like this: imagecreatefromjpeg("./nextdir/filename.jpg"); It should work fine!