|
-
Aug 17th, 2006, 03:51 AM
#1
Thread Starter
Hyperactive Member
IMAGE - PHP & HTML/PHP
Please study the following code - image accessing problem.
Run block 2 line 2 only - no problem.
Run block 2 both lines - problem.
Run block 1 and HTML block together - problem.
I need a remedy from this. Please make some R&D withe these code, take your time (24 hours) and try to give me a solution.
<?php
echo "Hello World <br>";
?>
<?php
//echo "hello <br>";
//echo file_get_contents(getcwd()."/zodiac/Gemini.jpg")."<br>";
?>
<html>
<head>
<title>Test</title>
</head>
<body>
<form name="f" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
<img src="<?php echo file_get_contents(getcwd().'/zodiac/Cancer.jpg').'<br>'; ?>" width="100" height="50">
</form>
</body>
</html>
-
Aug 17th, 2006, 04:33 AM
#2
Re: IMAGE - PHP & HTML/PHP
I cannot fathom why on earth you would want to get the contents of an image file and put it into an src attribute. What's stopping you just displaying it the normal way?
-
Aug 17th, 2006, 04:45 AM
#3
Re: IMAGE - PHP & HTML/PHP
 Originally Posted by systech44
Please study the following code - image accessing problem.
Run block 2 line 2 only - no problem.
Run block 2 both lines - problem.
Run block 1 and HTML block together - problem.
I need a remedy from this. Please make some R&D withe these code, take your time (24 hours) and try to give me a solution.
What if we don't? Are you going to sack us?
This is a double post: http://www.vbforums.com/showthread.php?t=422359
I suggest you learn HTML, like I stated in the other thread
-
Aug 17th, 2006, 04:49 AM
#4
Re: IMAGE - PHP & HTML/PHP
Or why not use MIME to put the image in the same file as the webpage. That would be sensible.
I don't live here any more.
-
Aug 17th, 2006, 10:13 AM
#5
Re: IMAGE - PHP & HTML/PHP
Sensible is relative.
Most posters, though, learn to use code tags by their third post ...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|