Jump to content

Verifying image links


Porl123

Recommended Posts

When you say format im guessing that you mean checking the file type i.e. jpg, gif

 

For this:

// image.jpg would display jpg
$fileType = substr($filename,strpos($filename, ".")+1);
print $fileType;

 

You may also want to check if the file exists

if(file_exists($pathToFile)) {
// ok file exists
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.