# file\_exsist() check for jpg, but something wrong..?

**URL:** https://forum.kirupa.com/t/file-exsist-check-for-jpg-but-something-wrong/72572
**Category:** Uncategorized
**Created:** [December 7, 2004, 7:30am UTC](https://forum.kirupa.com/t/file-exsist-check-for-jpg-but-something-wrong/72572 "2004-12-07T07:30:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sWo0p](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sWo0p](https://forum.kirupa.com/u/sWo0p)
#### Post date: [December 7, 2004, 7:30am UTC](https://forum.kirupa.com/t/file-exsist-check-for-jpg-but-something-wrong/72572/1 "2004-12-07T07:30:26Z")

</div>

Hi,

i’ff bin strugeling to get my script to work, i had a ton of help from **Teiz77** but still we cant get it to work… maybe some els knows a better sollution for this problem… ok here goes…

**Explanation:**

This script is there to read a \*.CSV file, read and remove all ,'s and show it in a HTML page… i made this script from the ground up so there stil are some things that can be cleanedup… allso there is a check function in there that checks if there are JPG’s precent and if not then dont show… now that is the part that i just cant get to work…

**This is a section of the script:**

```php

//* check if there is a jpg file precent if not show alternative *//
$plaatje = "\\ftd_brothers\\php_test\\product\\" . $pieces[2] . '.jpg';
if (file_exists($plaatje)) {
       echo "<td rowspan=\"2\">" . "<img src=\"\ftd_brothers\php_test\product\\" . $pieces[2] . ".jpg" . "\" height=\"100\"></td>";
	}else{
       echo "<td rowspan=\"2\">" . "leeg" . "</td>";
}

```

anyone have a sollution… ? :d:
