Anyone could help me with that?
I am trying to put a detection of files in each post, i.e., inside the main loop. But it does not work: file really exists, but I still got the result that it does not.
Anyone could help me with that?
I am trying to put a detection of files in each post, i.e., inside the main loop. But it does not work: file really exists, but I still got the result that it does not.
It's probably a path issue. What exactly are you using?
Thank you for your attention!
I realized that it works if I use something like:
file_exists('directory/file.any')
But not if I use:
file_exists('http://myblog.com/directory/file.any')
Is there anyway to pass the function tag in this second way?
file_exists requires a file path - not a url. Is the file on your server?
Yes, it is on my server.
But what is it was not, could it be possible to detect it by any other means?
Try putting the files in your current theme's folder and using TEMPLATEPATH. file_exists works for me this way.
http://codex.wordpress.org/Include_Tags#Including_Any_Template
This topic has been closed to new replies.