note 62679 added to function.getimagesize
| From: | dlogica at hotmail dot com | Date: | Tue, 07 Mar 2006 06:47:29 +0000 |
| Subject: | note 62679 added to function.getimagesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104962@lists.php.net to get a copy of this message | ||
There are some reports of problems with paths
one responds to "/images/imagename.gif";
the other to "images/imagename.gif";
Check that this depends on the server configuration
usually for virtual domains like in apache
The virtual domains in apache are configured (just an example, of course may vary but the idea is
the same)
<VirtualHost *:80>
ServerAdmin some@email
DocumentRoot /usr/local/www/data/yoursite/
ServerName www.yoursite.com
</VirtualHost>
or ir can be configured the same, with
DocumentRoot /usr/local/data/yoursite
so one ends with /, not the other
in php $_SERVER['DOCUMENT_ROOT']
is exactly that for one
Document_Root is /usr/local/www/data/yoursite/
and
DocumentRoot is /usr/local/www/data/yoursite
for the other case
so it will depend on virtual domain configuration if your code needs a reference to
"\images\this.jpg" or "images\this.jpg"
For portable code, and when need to use paths, be sure to get a variable with the correct path
assigning
$_SERVER['DOCUMENT_ROOT'] to a var on which you add o remove the triling slash
----
Server IP: 66.163.161.117
Probable Submitter: 201.153.25.85
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.getimagesize.php
Edit -- http://master.php.net/note/edit/62679
Del: integrated -- http://master.php.net/note/delete/62679/integrated
Del: useless -- http://master.php.net/note/delete/62679/useless
Del: bad code -- http://master.php.net/note/delete/62679/bad+code
Del: spam -- http://master.php.net/note/delete/62679/spam
Del: non-english -- http://master.php.net/note/delete/62679/non-english
Del: in docs -- http://master.php.net/note/delete/62679/in+docs
Del: other reasons-- http://master.php.net/note/delete/62679
Reject -- http://master.php.net/note/reject/62679
Search -- http://master.php.net/manage/user-notes.php