Posted 18 September 2006 - 02:16 PM
I am not a PHP programmer but am tring to use PHP through the Dreamweaver interface. WHich I why I may seem rather stupid.
I would like to display images and this little bit of code works fine when the images are in the same directory as the php file.
<img src="<?php echo $row_Recordset6['Name']; ?>">
However, I don't seem to be able to get my head around the code required to be able view the images if they are in another diectory.
Can someone please help.
Posted 18 September 2006 - 02:42 PM
<img src="../other_dir_name/<?php echo $row_Recordset6['Name']; ?>">
The ../ goes up one level from the current working direcotry (where the script is running) and then goes into the other_dir_name directory
<?php $fullPath = 'http://' . $_SERVER['HOST_NAME' . '/other_dir_name/' . $row_Recordset6['Name']; echo '<img src="http://' . $fullPath . '">'; ?>
Absolute path is where you provide the full path to the file/folder.
Posted 18 September 2006 - 02:59 PM
Up and working now - It's easy when you know how!
Posted 08 January 2007 - 02:02 PM
The content of the var seems to be an associative array of a row taken from the database.
Posted 17 April 2007 - 05:55 AM
wildteen88 is correct. And Recordset6 use for displaying the values or the data in a certain field of your dbase..
<a href="http://www.motion23....o.nr/">Motion23 Technology your business partner</a>
Game kana ba!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users