473,395 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dispaly image dynamicaly.

Hello every one i m using fpdf libray to creat pdf files from html form.

i m using

Expand|Select|Wrap|Line Numbers
  1. $pdf->Image('C:/DOCUME%7E1/mypic.PNG',60,140,120,0,'','');
  2.  
to display image on pdf and it works well.


in its first parameter it asks for exact path.it doesn't accept any address variable here.
but i want to make dynamic.i have able to get a complete path in an variable.

i have printed this variable.

//////////////////////////////
Expand|Select|Wrap|Line Numbers
  1. echo "$path";
  2.  
output
////////////////////
C:/DOCUME%7E1/mypic.PNG
/////////////////////////////////////////////////////


but how i put that path from variable in this parameter.?
when i use this variable as in this function.it give error.
Expand|Select|Wrap|Line Numbers
  1. $pdf->Image('$path',60,140,120,0,'','');
  2.  
it gives error.
plz help me for this.
Jan 3 '11 #1
1 1138
HaLo2FrEeEk
404 256MB
Remove the single quotes from around the variable name:

$pdf->Image($path,60,140,120,0,'','');

Single quotes are taken as literal strings, so variable names won't work inside them. Another way would be to replace the single quotes with double quotes, which will work with variables, but you shouldn't do that because you don't need the quotes at all:

Expand|Select|Wrap|Line Numbers
  1. $path = "something";
  2. echo '$path';
output:

$path

Expand|Select|Wrap|Line Numbers
  1. $path = "something";
  2. echo "$path";
output:

something

Expand|Select|Wrap|Line Numbers
  1. $path = "something";
  2. echo $path;
output:

something.

No quotes is recommended.
Jan 4 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Vladimir Kanovnik | last post by:
How I can download an image to display it in web browser using pl/sql server pages from a table which contains an image stored as blob? The table was created using pl/sql tool kit. I would like to...
10
by: Florian Brucker | last post by:
There are several tutorials on the net showing you how to create a thumbnail gallery with floating thumbails which automagically uses all horizontal space available (e.g....
3
by: minigitoo | last post by:
Hi I try to get dynamicaly all requests made to DB2 I process like this: 1) I stop then start my instance of database in the db2 control center 2) I use : db2 update monitor switches using...
1
by: Roman Muntyanu | last post by:
Hi all, I created resource dll dynamicaly using this code AppDomain curDom = AppDomain.CurrentDomain; AssemblyName myAssemblyName = new AssemblyName(); imagesAssemblyName.Name = "Images";...
2
by: Daniel | last post by:
how to create a gif or png dynamicaly in .aspx and return in response?
12
by: menmysql | last post by:
hi i want to dispaly an image on my webpage which is selected using <input type="file">. is it possible. please reply urgent ...
2
sumaiya
by: sumaiya | last post by:
I know how to load dynamic images in a movieclip sPhoto.loadMovie('http://localhost/1.jpg'); I have two movieclips "mcMain" and "mcArticle" mcMain ---- mcArticle --- mcPhoto mcPhoto is...
1
by: Amit1980 | last post by:
I have to toggle the arrow image on onclick event. Here is the code with the required functionility. What I want now is, when the page loads there will be right arrow images. The arrow should be...
5
by: peacemaker2008 | last post by:
Hi all the problem i am facing is different, i am trying to display images form database,i m giving code that i wrote $sql = "select * from upload "; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.