put your snippet so far here as an attachment and we can take a look for you.
ShowFiles
Started by Ralph, Nov 29 2004 02:21 PM
43 replies to this topic
#41
Posted 12 October 2009 - 07:20 PM
#42
Posted 12 October 2009 - 08:22 PM
The snippet in attach (ShowFiles) countains some functions (getFiles, listFiles, ..)
When calling the snippet more then once, an error occurs because the functions can only be defined once in PHP.
In a plain php-app I would put these functions in a separate include-file.
But it's not clear to me how to handle this in Etomite.
Thx for the effort.
When calling the snippet more then once, an error occurs because the functions can only be defined once in PHP.
In a plain php-app I would put these functions in a separate include-file.
But it's not clear to me how to handle this in Etomite.
Thx for the effort.
Attached Files
#43
Posted 12 October 2009 - 08:49 PM
Try searching the forum for ShowFiles - I think there is an updated version floating around.
Also, try to keep threads related to specific snippets all together - it makes it easier for people to find ;-)
Edited by DeanC, 12 October 2009 - 08:58 PM.
#44
Posted 12 October 2009 - 11:48 PM
For snippets you might call multiple times, use the following method for functions they may contain...
if(!function_exists(<function name>))
{
function <function name>()
{
... function body ...
}
}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











