You are here: Re: how to create a gallery without using the EXIF function? « PHP Programming Language « IT news, forums, messages
Re: how to create a gallery without using the EXIF function?

Posted by Geoff Berrow on 11/26/05 01:26

Message-ID: <1a5fo15abhng32vj8r7lvenrfodjmjqe6q@4ax.com> from FayeC
contained the following:

>I tried it and just modified the path as it is adding the username to
>the path but I then get several errors
>regarding not opening the stream and also a division by 0:

Yeah, the path has to be the full path to the directory. But I'm doing
it slightly differently now.

I've replaced:

//$dir = $path."";
$path=$_SERVER['PATH_TRANSLATED'];
//print "$path<br>";
$i= strlen($path);
//print"$i<br>";
do{$i--;}
while(strpos($path,"/",$i)===false);
//print"$i<br>";
//print substr($path,0,$i);
$path=substr($path,0,$i+1);
$dir=$path;

with

$path=$_SERVER['SCRIPT_FILENAME'];
$dir=dirname($path);

This will give you the path to the current directory. You'll have to
append any subdirectory info to that.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация