Jump to content

xploita

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xploita's Achievements

Member

Member (2/5)

0

Reputation

  1. two questions: 1-i am about to develop a commercial application and encode it before distribution.if i use ZF, will i be violating the license if i enocde my files ? 2- for users to run my application, do they have to find a host with special requirements or setup? thx in advance
  2. thx PFMaBiSmAd just realized that facet while browsing the php.net website. thx everyone
  3. ok,i'm developing an application and i have to support servers running both versions of php . never developed in php5 before,was wondering, should i develop the application for php5 then test/change to work on php4 or vice versa ? the application could take about 5 months to complete, shall i bother myself developing in php4 anyways ? regards
  4. no,what i meant is that an observer could be observed at the same time by another object. is this normal?
  5. trying to use the observer pattern,i found that the one object that's an Observer could be Observable(subject) at the same time.is this normal? if so,should it extend oberver and observable at the same time?
  6. following this article on the Observer Pattern: http://mesoimpact.com/articles/errorHandling.html i in the following class,i use the getinstance to instantiate other classes,however,i can not seem to pass any parameters to the instantiated classes. class Singleton{ function &getInstance ($class, $name = NULL){ static $registry = array(); $_instanceName = is_null($name) ? $name : $class; if ( !isset($registry[$class][$_instanceName]) || !is_object($registry[$class][$_instanceName]) ) { $registry[$class][$_instanceName] =& new $class; } return $registry[$class][$_instanceName]; } # end method } for example,i want to use the getinstance to have an instance of the class ERRORS,at the same time pass some parameters to the ERRORS class' constructor. any ideas?
  7. i've developed a simple framework for handling my simple projects.however,each class does it job separatly.they are not united in a good way. directory structure: /framework |-/cache |-/classes |-i18n class |-Errors class |-templates(template engine) class |-database class |-files class |/languages | -english |-french |-/templates -index.php -bluh.php -files_for_my_new_app.php -I use singleton for every class on it's own. -Every application i create depends on most of the classes all the time(i ALWAYS need i18n,errors,templates classes loaded) some other times i load database and files classes when needed. how do i manage those classes? any ideas about how to optimize my directory structure? should i create an Father class that extends all needed classes,and then extend that father class in my new app? i develop in php4.
  8. what if i have a sql file with the tables to be created and some data to be populated as well. i want to use php to apply this sql file to a specific database. do i have to read it into a string and use that string as an sql statement ? i mean..what if the file is large,is there a better way? regards
  9. in the public_html directory for my hosting account. if i want to create a directory to hold for example a forum (i.e public_html/forums ) what are the permissions that i should use to create the forums directory in case of a suexec system and no suexec system? regards
  10. for me to check if a form has been submitted.do i better use a hidden field,check for the value of the submit button or what? better = security wise. regards
  11. my application is an encrypted closed/source commercial application. if i intend to use any class that's a GPL licensed (i.e for inputFilter ) do i have to make my application an open source one under the GPL license as well? regards
  12. ok i know that there exist some classes that can do this. the problem is that i want to create my own class since i can't use a GPL app in a closed code/commercial application any tutorials or hints to use about any of the mentioned archive types in php? regards
  13. why do applications store the settings in variables instead of constants? constants should be alot more safer,and settings like DEBUG or SITE_URL or PATH are changed only during installation or another major change in the app or system. i.e i can have a settings file with this: define('DEBUG',true); later i can check: if (defined('DEBUG')) { //print debug information }
  14. that's for checking if the variables were initialized or not. still u didn't confirm about initializing them(in the begining of the script) correct me if i'm wrong. $string =''; $boolean = true/false; $array=array(); $int/$double=NULL; what about objects? regards
  15. so,u mean i'll be using NULL for all variable types? or true/false for boolean '' for strings another thing,which is better.to use isset or just if($varname) to check if the variable has a value ? regards
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.