Title: php &#8220;if&#8221; function help
Last modified: August 19, 2016

---

# php “if” function help

 *  Resolved [mmmbisto](https://wordpress.org/support/users/mmmbisto/)
 * (@mmmbisto)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/php-if-function-help/)
 * I’m a bit stuck, I’m using the Flash Fader plugin, which includes a text file,
   I was wondering if it was possible to make the if function that I saw in the 
   WordPress documentation to only include the text file if it’s there, otherwise
   not to include anything?
 * The php on the wordpress site for plugins:
 * > <?php
   >  if (function_exists(‘FUNCTION NAME’)) { FUNCTION_NAME(); } ?>
 * The php include on the Flash Fader site:
 * >  <?php
   >  include (ABSPATH.”wp-content/flashfader/flashfaderhtml.txt”); ?>
 * Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [t31os](https://wordpress.org/support/users/t31os/)
 * (@t31os)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/php-if-function-help/#post-1027473)
 *     ```
       <?php
       $myfile = 'some/path/to/file/thefile.txt';
       if(file_exists($myfile)) {
        include($myfile);
       }
       ?>
       ```
   
 * Checks if the file exists, then includes it if it does…
 * Is that what you need?
 *  Thread Starter [mmmbisto](https://wordpress.org/support/users/mmmbisto/)
 * (@mmmbisto)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/php-if-function-help/#post-1027477)
 * Thank you so SO much, it appears to be working fine! You’re an absolute STAR 
   😀
 *  [t31os](https://wordpress.org/support/users/t31os/)
 * (@t31os)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/php-if-function-help/#post-1027478)
 * 🙂
 * Glad i could help .. 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php “if” function help’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [t31os](https://wordpress.org/support/users/t31os/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/php-if-function-help/#post-1027478)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
