|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
simple show image script (php)
Hi,
I'm trying to write a simple script that outputs a html file with an image (the url for which comes from a var) php: PHP Code:
Last edited by jben.net : July 7th, 2003 at 12:39 PM. |
|
#2
|
|||
|
|||
|
post truncated (again!)
continued from before...
PHP Code:
Everytime I call the page, ie http://www.mydomain.com/show_image....ges/myImage.jpg it gives me this error... Warning: Unexpected character in input: ' in /home/www/audiofer/vicky_devine/show_image.php on line 28 Warning: Unexpected character in input: ' in /home/www/audiofer/vicky_devine/show_image.php on line 28 Any ideas why ?? I'm also trying to resize the page when it loads with javascript, with the width and height being determined using getimagesize. When I echo the $imgW and $imgH vars they return the correct values but the page doesn't resize, again, any ideas why ?? thanks in advance, Jon |
|
#3
|
||||
|
||||
|
I don't know if you mispasted or if this is the error, but you don't close your quote or have a semi-colon on the following line:
PHP Code:
If that's not the problem, make sure you point out what's on line 28. It's hard to count accurately here in the forums. As for resizing the window, please please don't. In some browsers, if the window's resized by javascript, then any time you open your program, it defaults to the last size it was resized to. This is very irritating if you like your windows to open maximized. If you insist on doing it, check out devguru's javascript reference on the window object to see the specification for resizing. It may be that you don't need quotes around the values. |
|
#4
|
|||
|
|||
|
hi,
Yep, that's the offending line: PHP Code:
But what's wrong with it ???? $imageURL is just a string, and the image loads on the page fine, so why it is throwing errors ? On the resize front, this is for a flash site, that's opened in a chromless window anyway, so I guess I will have pissed off a lot of people anyway so a few more won't matter ! Thanks, Jon |
|
#5
|
|||
|
|||
|
right, resizing works fine now, it was the single quotes around the w/h vars.
stil getting the same unexpected character in input bollax though, dam. Jon |
|
#6
|
||||
|
||||
|
You're lacking a closing quotation mark and a semi-colon on this line:
PHP Code:
It should read: PHP Code:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > simple show image script (php) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|