note 62679 deleted from function.getimagesize by bjori
| From: | bjori@php.net | Date: | Tue, 07 Mar 2006 13:36:44 +0000 |
| Subject: | note 62679 deleted from function.getimagesize by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104980@lists.php.net to get a copy of this message | ||
Note Submitter: dlogica at hotmail dot com
----
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