Jump to content

Search the Community

Showing results for tags 'img'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. Hello! I hope someone can help me with an issue I'm having. Recently, I have had an issue displaying my banner on my website, which is has a .php file source. I have had any known changes to my php version (currently on 5.6, and considering to switch to 7.0); also, I am hosted through Dreamhost. If someone could look at the following code and offer any advice, I'd be greatly appreciative! My link on the design: <img src= "http://hayalkarga.com/theme/10/images/banner/banner.php" alt= "" /> The Image Code: <?php $dir = ''; $file = ''; $num = 0; $count = 0; $array = array(); $allowedExtensions = array('jpeg', 'jpe', 'jpg', 'gif', 'png', 'bmp'); mt_srand((double)microtime()*1000000); $dir = opendir('.'); while (false !== ($file = readdir($dir))) { if(!is_dir($file) && in_array(strtolower(substr(strrchr($file,'.'), 1)), $allowedExtensions)){ $array[] = $file; } } $count = count($array); $num = mt_rand(0, $count-1); if($count > 0) { $size = getimagesize($array[$num]); $stream = fopen($array[$num], 'rb'); if(is_array($size) && $stream !== false){ header('Content-type: '.$size['mime']); fpassthru($stream); exit(); } } else { echo 'Error: No Images'; } ?> I should note that the image works in my browser at http://www.hayalkarga.com/theme/10/images/banner/banner.php, but does not incorporate into the design when utilizing the link in HTML. Thank you in advance!
  2. Hey guys, i'm new to this site and would need some help with coding. So i'm making a car part website which should has brand/model search. It's a dropdown search which will get the brand / model from database and should display all the parts for that exact model, from folder. Database structure which i have is id, master, name. ( Here's some pictures to clear out what i'm doing. http://imgur.com/a/7XwVd ) So the problem is that it does not get the images from folder named ex: *_audi_a3.jpg. And link to codes what have been written already. Parts.php: http://pastebin.com/q6vdypge Update.php: http://pastebin.com/DymhGQ17 Search_images.php: http://pastebin.com/LF5Q0i8f Core.js: http://pastebin.com/bgc0y4TS I don't know what's wrong with it sadly. One thing i noticed when i used firebug it gives error on category when searching error:true. Hope you guys understand what i mean here, and also all help is appreciated. And move this post if it's in wrong place. Thanks!
  3. I'm trying to change the image within a html src="" attribute with PHP and can't seem to do it so the image will change on the fly. What am I doing wrong here? My code is below $image = "Trousers:"; if($image == "Trousers:"){ $imageChange = "images/socks.PNG"; } echo '<div id="itemImg"><img src="<?php echo $imageChange ?>" width="100px" height="100px" /></div>';
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.