Jump to content

PHP and Graphics!


NewGenerationTB

Recommended Posts

Let me give an example,

[b]<?php
<img src = "me.png">
?>[/b]

Or

[b]<?php
Echo <img src = "me.png">
?>[/b]

note: both of above codes did not work!

Or

[b]<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>[/b]

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
[b]<?php
include('head.inc');
>[/b]

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[code]<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>[/code]

The above is an extract from one of my php files and works with IE and Firefox.
Link to comment
Share on other sites

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.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=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.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.