Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am having trouble showing an image on a webpage. The URL to the image is correct, yet it doesn't show the image, but rather the alternative text.
This is the IMG code:
<img scr="../../images/badges/<?php echo $blog_post['content']; ?>" alt="" />
The html output is this:
<img scr="../../images/badges/acht.png" alt="received-badge" />
I double checked the URL to the image, but that is correct.
The code is also not wrong and the PHP variable is always filled with a default value. These images do exist.
I know it should work, because there are more file I include with PHP using the "../../" structure in the URL.
I really feel stupid to not get it to work.
EDIT: I forgot to mention, that I checked FireBug in FireFox and in the "Net" tab it should show all the images that should be loaded and there is nothing there.
Anyone got an idea?
Thanks in Advance,
Mark Dijkema
Change scr to src, you have typo :)
<img scr... should be <img src....
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've created simple page where you can add images to database. Here is my code, where i pull images to website:
enter image description here
in DevTools i can see that all images are pulled correctly:
enter image description here
But when i click next/previous
website is reloading, but picture is still the same, and URL is changed:
enter image description here
Do you have any idea why?
I even add JS script to add intervals to this carousel but it's still doesn't work.
Thank you
It seems the problem about javascript library. it is not loading. You need to add full code to test it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I currently don't even know what exactly to search, don't know if that procedure has a name or something, that's why i decided to post a question.
For example, when i hit mysite/test.php i want that php to make a request to another .php on another server and get all the html contents of that page and echo it in test.php, is that even possible?
Let's suppose test.php is that php file which makes a request to take_me.php .
take_me.php could have just an echo or it could be a full content page.
Can i have the content of take_me.php shown in test.php?
You could use file_get_contents and echo to screen like below:
$html = file_get_contents('http://www.google.com');
if (isset($html)) {
echo $html;
}
You may have issue with images rendering correctly etc... due to paths but it will work.
http://php.net/manual/en/function.file-get-contents.php
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am new in making word press theme. I am trying to call a image from a images folder which is in the theme folder of word press but when I refresh the page then all the page is disappear and nothing is showing even not any php error.
i want to show my logo in the wordpress theme which is like in the image
I think it has to be get_template_directory_uri() instead of get_template_directory_url() (lowercase i instead of lowercase l).
You also can use bloginfo. See: http://codex.wordpress.org/Function_Reference/bloginfo
In your case:
<img src="<?php bloginfo('template_url'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>">
And of course make sure you're image is in the right location.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
its me again.. is it possible to take webcam stream and add it to webpage? I checked page source. looks like it creates image in folder on their server
(http://www2.hak.hr/rmt/?l=135) is it posible to get that image to my webpage? Thanks anyone for help
You can embed the image with something like this:
<img src="http://www2.hak.hr/hak_webcam/cam.asp?id=22" alt="img"></img>
You just have one problem when the image adress is changing you have to do it too! To prevent the embed from another site it seems like they are adding as url parameter a timestamp.
As you can see they have a copyright on this so you aren't allowed to embed it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm using Following code.
<img src="http://localhost/component/my_task">
its not working.
Any idea, Why not??
how can i perform my task in joomla by image source code.
NOTE:: this link perform my task ( MYURL/My_Component/My_Task). is it possible or not??
It's not working because http://www.localhost/my_task does not return a valid image.
Are you sure that you should use www.localhost? Remove the www part if you want it to point your local web server.
use $_SERVER['HTTP_HOST'] replace www.localhost
<img src="http://<?php echo $_SERVER['HTTP_HOST']?>/my_task/test.png">
If you're using Joomla! you could use path this way
<img src="<?php echo $this->baseurl ?>/path/to/your/image/image.jpg">
For ex, if you have your image in the default folder, it should look like
<img src="<?php echo $this->baseurl ?>/images/stories/myimage.jpg">.
The way you're doing you're not linking to an image, but to a directory....