sildona Posted October 25, 2012 Share Posted October 25, 2012 I have a PHP file that queries Mysql and displays information. The images that are named in the database reside physically in a directory. The file works just fine -- if I place it directly in the image folder and call it from there. What I need to do is paste it in Wordpress and call it using a shortcode. However, when i paste the file in a Wordpress page, it won't work (I have the Allow PHP in Posts plugin), so the file is being run from the plugins directory, so it doesn't reach the necessary directory. What line of code can I insert to make the file read the image directory? Below is what I'm using now. echo "<img src='".$imgrow[image]."' height='120' />"; (where $imgrow is the mysql fetch and "image" is the field in the database. thanks Link to comment https://forums.phpfreaks.com/topic/269880-displaying-an-image-listed-in-a-database-and-in-a-file-folder/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.