0

Hello i know this is a dumb question but.... please help me

i've been across google for this and found serval solutions but none that worked for me. i'm trying to use the PHPExcel lib in a plugin i'm making but i can't get wordpress to find the file.

if (! file_exists(SPEE_PLUGIN_DIR . '/lib/PHPExcel.php') ) { echo "nope :("; }
if (! file_exists(CHECKIN_PLUGIN_DIR . '/lib/PHPExcel.php') ) { echo "nope"; }
if(file_exists(plugins_url( '/lib/PHPExcel.php' , __FILE__ ))) {echo "heyo";}
file_exists(dirname( __FILE__ ). '/lib/PHPExcel.php');

i've danced around the 2 commands above but both echo's out meaning they can't find the file. the path is correct, and written in the same capitals as the folder and the file's name. so what am i doing wrong? in advance THANKS!

1 Answer 1

0

Not sure it works now, used it months ago. But you can give a try please

file_exists(dirname( __FILE__ ). '/lib/PHPExcel.php');
6
  • Ty ill try that when i get off work :-)
    – Alexander
    May 21, 2015 at 11:18
  • nope didn't work :(
    – Alexander
    May 21, 2015 at 14:48
  • Where are these files in relation to WP? Which folder?
    – Welcher
    May 21, 2015 at 20:09
  • /wp-content/plugins/time_table/PHPExcel/PHPExcell.php
    – Alexander
    May 21, 2015 at 21:35
  • What is path & name of file where you use this function. Because in the question you write lib but here there is no "lib" folder. Please clarify.
    – Vee
    May 22, 2015 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.