Jump to content


ShowFiles


  • You cannot reply to this topic
43 replies to this topic

#41 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 12 October 2009 - 07:20 PM

put your snippet so far here as an attachment and we can take a look for you.

#42 subotni

    Etomite Forum Newbie

  • Member
  • 4 posts

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.

Attached Files



#43 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 12 October 2009 - 08:49 PM

Does the php script work twice on a non-etomite standard php page?

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 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

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