Check if image file ??

allow_url_fopen is activated in your PHP config 
 
 $filename = "http://".$_SERVER['SERVER_NAME']."
/media/img/".$row['CatNaam'].".jpg";
 echo"  <img src=\"".$filename."\" alt=\"".$row['CatNaam']."\">";

        

        if (file_exists($filename)) {
            echo "The file $filename exists";
        } else {
            echo "The file $filename does not exist";
        }
Related Posts:
  • how Installing mod_rewrite localhost If you’ve installed Apache yourself, read on. Because of its  popularity, mod_rewrite is now included with all common  Apache distributions. If desired, you can verify if your Apache installation has the mod_rewr… Read More
  • Building Dynamic Images-PHP You want to create an image based on a existing image template and dynamic data typically text). For instance, you want to create a hit counter. Load the template image, find the correct position to properly cente… Read More
  • PHP while Loop PHP while Loop with code while - loops run  a set of code as  the  condition is true. Basic Syntaxwhile (condition){    code for executed;}<?php$k=1;while($k<=5) {  echo "The numbe… Read More
  • Visualize Traffic with DIY Vector you will learn how to create your own traffic chart using the incredibly cool Canvas framework, which can produce vector graphics and animations with a little bit of HTML and JavaScript. All code referenced in this hack i… Read More
  • PHP Expressions An expression is the basic building block of the language.  Anything with a value can be thought of as an expression.  Examples include: 5 5+5 $a $a==5 sqrt(9) By combining many of these basic expressions, you… Read More
  • security to POST-PHP $_POST  POST-method variables. Form field data from regular  POST-method forms.   PHP automatically creates variables for all the data it receives  in an HTTP request. This can include GET data, POST … Read More
  • Php-Configuration Control Through .htaccess The .htaccessfile is very powerful and can control more than just URL structure. For instance, you can control PHP configuration options using the .htaccessfile. To increase the memory allotted to PHP use this command: php_v… Read More
  • How to Enable mod_rewrite at Server mod_rewrite may not be enabled by default in your Apache configuration. To make sure,open the Apache configuration file, named httpd.conf. The full path of the file will be \Program Files\xampp\apache\conf\httpd.conf. Open … Read More
  • PHP Jobs interview-Common Section PHP Syntax Variables Operators Arrays If/Then Statements Switch Statements For Loops Foreach Loops While Loops Do While Loops User-Defined Functions Object Oriented Programming with PHP… Read More
  • URL rewriting-various exercises-seo  Installing mod_rewrite Testing mod_rewrite Working with regular expressions Rewriting numeric URLs with two parameters Rewriting keyword-rich URLs Building a link factory Pagination and UR… Read More
  • MySQL with php The basic steps of performing a query, whether using the mysql command-line tool or PHP, are the same:Connect to the database.Select the database to use.Build a SELECT statement.Perform the query.Display the results. Wh… Read More
  • Sorting Arrays-PHP PHP supports a variety of ways to sort an array when  I say sort, I am referring to an alphabetical sort if it is a string,  and a numerical sort if it is a number. When sorting an array,  you must k… Read More
  • php-Dynamic Variables Sometimes it is useful to set and use variables dynamically.  Normally, you assign a variable like this:  $var = "hello";   Now let's say you want a variable whose name is the  value of the $var va… Read More
  • var_dump and print_r -PHP-standard Functions like var_dump and print_r are also invaluable when debugging var_dump var_dump functions displays information about variables in a simple, readable  format. This function is very useful when debugging—p… Read More
  • Php Date or Time Simplest display of date or time is telling your users what time it is. Use the date( ) or strftime( ) strftime( ) says: Wed Oct 20 12:00:00 2004date( ) says: Wed, 20 Oct 2004 12:00:00 -0400 Both strftime( ) and date( )… Read More