Jump to content


Photo

html <img src tag


  • Please log in to reply
4 replies to this topic

#1 prezident300

prezident300

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 25 January 2013 - 01:46 AM

I transferring my website from an html file to a php file. I'm using a linux machine running apache2/php, so i created the php files and transferred the files over to the /var/www dir and changed the permission on the folder. when i run the php files in the browser my images are not showing, but it shows in the html file outside of the /var/www dir. How do i get my images to show in the php file ?

#2 Xaotique

Xaotique

    Advanced Member

  • Members
  • PipPipPip
  • 558 posts
  • LocationPennsylvania, United States
  • Age:21

Posted 25 January 2013 - 09:27 AM

You don't do anything special. Only what's in PHP tags <?php ?> is needing of PHP. If you have a plain HTML page, you can just change the .html extension to .php and it will work just fine.

#3 Nicknnick

Nicknnick

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 08 May 2013 - 01:28 PM

Try this one...found this in google.

 

<?php
$image 
"images/picture2.jpg";  
Echo 
"<img src=".$image." Style=width:300px;height:240px;>"
?>

 

if its work, then let me know.

 

Thank you!



#4 noahwilson

noahwilson

    Member

  • Members
  • PipPip
  • 15 posts

Posted 09 May 2013 - 05:34 AM

You can be assign <img srs=".$variable.">

i hope it will be work.


if you need International Moving Companies and looking best relocation services to Moving To Europe just contact to Australian vanlines.


#5 BlueBoden

BlueBoden

    Advanced Member

  • Members
  • PipPipPip
  • 306 posts
  • LocationDanmark

Posted 09 May 2013 - 06:16 AM

You do not need to change the permissions on the folder, as long as your webserver is allowed access to the folder – to edit the files, simply run "gksudo nautilus /var/www", (or whatever filemaneger you are using) – you can also run your editor (I.e Gedit, aptana studio, etc..) as root. One of the easiest ways to do that, is either to "sudo gedit" and then open the file you want to edit.


Edited by BlueBoden, 09 May 2013 - 06:16 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com