Jump to content


Photo

PHP and Graphics!


  • Please log in to reply
6 replies to this topic

#1 NewGenerationTB

NewGenerationTB
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 02 April 2006 - 07:29 PM

Let me give an example,

<?php
<img src = "me.png">
?>


Or

<?php
Echo <img src = "me.png">
?>


note: both of above codes did not work!

Or

<html>
<head>
wazzup
</head>
<body>
Thank You for your help!
<img src = "me.png">
<object width="50" height="50">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="50" height="50">
</embed>
</object>

</body>
</html>


NOTE: I saved above html code saved as [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]header.inc[!--colorc--][/span][!--/colorc--]

I then I called it into php in this manner
<?php
include('head.inc');
>


However in ZEND php editor shows the flash movie, but the total scene is white and nothing is on there. Regarding the pciture, it just shows as if php cannot load the pictures.

I will readdy appreciate you guys help. I have been reading the php book, but they do not talk about graphic uplaod like we do in html. I did not find any helpful in information online. Hopefully, here I will get gurus' help.

Thank You in advance!

NewGenerationTB

#2 Desdinova

Desdinova
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 02 April 2006 - 07:41 PM

echo "<img src=\"bla.png\">";

thats a way that works

and the flash file probably doesn't work because you've only used the EMBED tag. Try opening the page in firefox/netscape/opera. I believe they listen to EMBED. IE does not. Not sure though.

IE uses PARAM.

#3 lpxxfaintxx

lpxxfaintxx
  • Members
  • PipPipPip
  • Advanced Member
  • 181 posts

Posted 02 April 2006 - 08:02 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]echo "<img src=\"bla.png\">";[/quote]

Or you could simply do echo '<img src="bla.png">';

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,015 posts

Posted 02 April 2006 - 08:06 PM

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width=375 height=50>
<param name=movie value="crackit1.swf">
<param name=quality value=high>
<param name=bgcolor value=#FFFFFF>
<param name=wmode value=window>
<param name=loop value=false>
<param name=menu value=false>
<embed src="crackit1.swf" quality=high bgcolor=#FFFFFF width=375 height=50 wmode=window loop=false menu=false type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed></object>

The above is an extract from one of my php files and works with IE and Firefox.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#5 NewGenerationTB

NewGenerationTB
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 03 April 2006 - 03:27 AM

Thank You folks, the problem is still the same. Let me post the entire code down there.

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]<?php
include_once('header.inc');
echo '<img src = \"map.png\">';
echo '<img src = "map.png">';
echo "<img src = "map.png">";


echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macr...ersion=5,0,0,0" width=375 height=50>
<param name=movie value="TashiDelek.swf">
<param name=quality value=high>
<param name=bgcolor value=#FFFFFF>
<param name=wmode value=window>
<param name=loop value=false>
<param name=menu value=false>
<embed src="TashiDelek.swf" quality=high bgcolor=#FFFFFF width=375 height=50 wmode=window loop=false menu=false type="application/x-shockwave-flash" pluginspage="http://www.macromedi...hockwaveFlash">
</embed></object>';

?>[!--colorc--][/span][!--/colorc--][b]

None of the above code seems working in Zend php editor!
Note: all the graphics and php files are in the same folder.

#6 Desdinova

Desdinova
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 03 April 2006 - 07:20 AM

no, you're mixing things up right now.


echo '<img src = \"map.png\">';


you open the echo with '
so you don't have to escape the "

meaning, either use
echo '<img src = "map.png">';

or

echo "<img src = \"map.png\">";



if the flashfile isn't working this is probably because it can't be found.

#7 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 03 April 2006 - 08:13 AM

I'm going to go out on a limb and say you are getting way ahead of yourself. You need to actually read the PHP book and go through a few of the examples. You don't even need the PHP echo command to output static xhtml. You can simply leave it outside of the PHP tags. It is wonderful that you want to learn PHP, but you must crawl before you run. You need to actually understand the syntax of a function before you can use it properly. The first place you need to start is with understanding strings, constants, variables and arrays.

I am not trying to be mean, only make sure you get pointed in the right direction.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users