Jump to content

[SOLVED] Php 4 to php 5 error


leest

Recommended Posts

Hi,

 

I have a link on my website that calls a download script and downloads an image in to my webpage.  This works perfectly in php 4.  I am currently converting my site from php4 to php 5 to allow me to use another hosting company and i am having trouble with passing information in the link to the downloads page.  If i use this script un changed it doesn't display any errors just stops displaying the page at the point of the script.

 

the script  is:

 

<img src="http://www.websitename/image_manager/download.php?id=

[code=php:0]=$site_id 

[/code]

 

the problem occurs when i try to change from the short method of writting the php tag to the normal version, with the short version the = sign changes to read along with the php tag and on the longer version it doesn't  when the script is then run it displays the following error:

 

"Parse error: syntax error, unexpected '=' in /public_html/search/search_results.php on line 428"

 

if i remove the equals sign then it displays the page correctly but does not download the image.

 

Any help or advice would be appreciated.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/85186-solved-php-4-to-php-5-error/
Share on other sites

 

OK this code works fine in php4 and returns an image from a mysql database by passing the site_id to a download script through this link.

 

However in php 5 it doesn't work. 

 

In the script i have used the short tag for php ie, just the less than and a question mark, when i add php to the tag, it stops the code from working.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.