I can access my file and work correctly in localhost, but problem starts when I move it to the host.
This is my code:
Show My Pdf
I try this and have the same problem:
<embed src="<?php echo base_url();?>uploads/syarat/<?php echo $username.'/'.$namafile;?>" type="application/pdf" width="100%" height="
When I access directly, the server does not respond.
actually i can access easyly with google viewer
<div class="col-xs-12">
<div class="row">
<i class="ace-icon glyphicon glyphicon-plus"></i> Buka Di Tab Baru
</div><br/>
<object id="pdf" data="<?php echo base_url();?>uploads/syarat/<?php echo $username.'/'.$namafile;?>" type="application/pdf" width="100%" height="600px" />
Related
There is email template with html:
<tr style="display: inline-block;margin-right: 10px;">
<th title="Viber" style="width:32px;vertical-align:middle">
<a href="viber://chat?number=%2bPhoneNumber" style="Margin:0;color:#ff7878;font-weight:400;margin:0;padding:0;text-align:left;text-decoration:none" target="_blank">
<img src="<?= $_SERVER['SERVER_NAME'] . '/img/viber.png' ?>" width="32" height="32" border="0" style="border:none;display:block;margin:0 auto;max-width:32px" class="CToWUd">
</a>
</th>
</tr>
Received email (Thunderbird, Outlook...etc) have not a link to viber chat. Only image. Mail send by php Mailer (YII2)
But letter with href http://...... contains link and is clickable
it seems like I cannot style my echoed image in php. How can I do this? Thanks :)
<img src="data:image/jpeg;base64,'.base64_encode($row['image'] ).'" height="80px" width="80px" class="img-thumnail" style="margin-bottom:90px;"/>
Try This code
<img class="im" src="data:image/jpeg;base64,'<?php echo base64_encode($row['image'] ); ?>'" height="180px" width="180px" class="img-thumnail" style="margin-bottom:90px;"/>
I create a block from configuration. Inside this block, I write this code...
<div class="provider-bg" id="provider1">
<img alt="" class="img-responsive" src="<?php echo base_path().path_to_theme() ?>/images/provider-1.jpg" />
</div>
Then, I save with PHP in text format.
My virtual host is ... http://localhost:8888/drupal
So, the image path will be like this ...
<img alt="" src="/drupal/sites/all/themes/myancast/images/ios.png">
This image appears in the last few days ago. Today, I run the site and that image disappear immediately and got 403 error.
Failed to load resource: the server responded with a status of 403 (Forbidden).
I'm trying to find the solution the whole day. But, I still cannot solve.
Can anyone help me please ?
Add global $base_url in your code and use like below
<img alt="" class="img-responsive" src="<?php echo $base_url.'/'.path_to_theme(); ?>/images/provider-1.jpg" />
did you try this ?
<img alt="" class="img-responsive" src="<?php echo '/'.path_to_theme(); ?>/images/provider-1.jpg" />
try this,
<?php
$imgurl = file_create_url(path_to_theme().'/images/provider-1.jpg');
?>
<img alt="" class="img-responsive" src="<?php echo $imgurl ?>"/>
I would love to remove the Dots as you can see in the image Please Help
The Below is my code
<body>
<h1>Please Check Your Email For Verfication that you are not a Bot :-) </h1>
<a href='hotmail.com' class="icon" ><img src="outlook.png" width="70px" height="70px"/></a><br>;
<img src="Gmail.png" width="70px" height="70px"/><br>;
<img src="yahoo.png" width="70px" height="70px"/><br>;
</body>`
Perhaps removing the semi-colons could help:
<body>
<h1>Please Check Your Email For Verfication that you are not a Bot :-) </h1>
<a href='hotmail.com' class="icon" ><img src="outlook.png" width="70px" height="70px"/></a><br>
<img src="Gmail.png" width="70px" height="70px"/><br>
<img src="yahoo.png" width="70px" height="70px"/><br>
</body>
No need for the semicolons at the end of your lines, see below:
<body>
<h1>Please Check Your Email For Verfication that you are not a Bot :-)</h1>
<a href='hotmail.com' class="icon" ><img src="outlook.png" width="70px" height="70px"/></a><br>
<img src="Gmail.png" width="70px" height="70px"/><br>
<img src="yahoo.png" width="70px" height="70px"/><br>
</body>
If you'd like to review HTML syntax, this site is a great resource: HTML5 Syntax
So you have a few issues that are causing extra symbols to appear, and the links won't work as you'd expect.
The semi-colons are showing up because you have semi-colons after each <br/> which don't need to be there.
The underscores after each image are appearing because the images are nested in anchor tags. Anchor tags by default have an underline text decoration, and images have a small bit of extra sizing in most cases.
In anchor tags on almost all webservers, if you don't define a protocol (like http://) to use, then it will send the user to http://yoursite.com/<current_page>/<clicked_link> rather than the external website that you'd expect.
Using these should fix all of that:
HTML
<body>
<h1>Please Check Your Email For Verfication that you are not a Bot :-) </h1>
<a href="http://hotmail.com" class="icon" ><img src="outlook.png" width="70px" height="70px"/></a><br>
<img src="Gmail.png" width="70px" height="70px"/><br>
<img src="yahoo.png" width="70px" height="70px"/><br>
</body>
CSS
.icon {
text-decoration: none;
}
I've encountered this issue a couple times but have always found a "hack" way around it. Is there a special way to link an image in a WordPress template to an outside url beyond the typical a href tag? Here's the images I'm trying to link to outside urls:
<div class="socialMedia">
Follow Us: <br />
<img src="<?php echo get_bloginfo('template_url') ?>/images/facebook.png" alt="facebook"/>
<img src="<?php echo get_bloginfo('template_url') ?>/images/twitter.png" alt="twitter"/>
<img src="<?php echo get_bloginfo('template_url') ?>/images/googleplus.png" alt="google plus"/>
<img src="<?php echo get_bloginfo('template_url') ?>/images/instagram.png" alt="instagram"/>
</div><!--.socialMedia-->
<div class="socialMedia">
Follow Us: <br />
<a href="<?php echo get_bloginfo('template_url') ?>/images/facebook.png" target="_blank" > <img src="<?php echo get_bloginfo('template_url') ?>/images/facebook.png" alt="facebook"/> </a>
</div><!--.socialMedia-->
did you mean it!!?