-
☆ A M B ☆
- 24,524 Posts
Two points; you’ll need to convert the <?php ... ?> part to a snippet, and the snippet would have to return something. Presumably the included php code returns the filename, so your snippet in turn would need to return it. Don’t try to return the include function; all you’ll get doing that is the success/failure return code of the include function! Most likely you’ll have to hack the script a bit to get its return value (the filename) into a variable, then have your snippet return the variable.
Thanks for replying Susan.
In the first method the php script is called from an .htaccess file - I’m guessing that a snippet call can’t be used there. The second method gives the option of using a ’require’ to include the php - I don’t understand how to use a snippet in the context it asks for. If I did understand that, then hacking the actual script to get the required return value is probably well beyond my powers.
I think I’m just going to have to cut and paste everything into two separate files instead.
Thanks anyways.