Re: fit window to image
| From: | Marek Kilimajer | Date: | Fri, 17 Jan 2003 14:00:27 +0000 |
| Subject: | Re: fit window to image | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132002@lists.php.net to get a copy of this message | ||
You need to change directory permissions too
Ezequiel Sapoznik wrote:
ok, I try with <?php $size = getimagesize ("../images/1817.jpg"); echo "$size"; ?> to then use the x and y with a javascript code like: window.open ('win_sizer.html','Photo','toolbar=yes,status=yes,scrollbars=yes,location=ye s,menubar=yes,directories=yes,width=x,height=y') But in the php part, I am receiving the following error: Warning: getimagesize: Unable to open '../images/1817.jpg' for reading. in /home/sites/site8/web/prueba.php on line 12 I'd like to add that I changed mode to 777 (UNIX) Thank you for your help. Ezequiel "Justin French" <justin@indent.com.au> escribió en el mensaje news:BA4DB321.1CD6B%justin@indent.com.au...php can help, but remember, PHP only outputs HTML code to the browser...itcan't actually resize the window, because that's a client-side thing like javascript. but you can find out the x and y of an image with http://www.php.net/manual/en/function.getimagesize.php Then use this information in a javascript which resizes the browserwindow.Of course for the javascripts, you'd need to ask a JS list, and remember that not everyone has javascript, and not everyone enjoys the webdeveloperresizing their windows and 'taking control' of their browsers :) Justin on 17/01/03 12:37 PM, Ezequiel Sapoznik (ezequiel@mibbva.com.ar) wrote:Hi! Is there anyway in php to fit the window to the size of an image? Thanks! Ezequiel