Jump to content

NixNod

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

NixNod's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Maybe you can put the INDEX.PHP on the INCLUDE_PATH of your system and them, put an INDEX.PHP that include that INDEX.PHP, so you will just have to change 1 file.
  2. I'm interested on it too, will be very helpful for me. But it depends of how you program your app, you must program your app thinking that you will put one plug in for the app expect one plug in. For example: You must create the admin menu, you must think that if you put some plug-in that menu will be automatically read the menu from plug in too.
  3. Hello guys, can someone give me an better explanation & example of the use of MVC? I'v already read all the MVC articles in the Resources topic. What the Controller really does? >> Just redirect to the right methods? Just it? What the Model really does? >> Abstract the data and prepare? What the View really does? >> Show up the data? If someone could write some example I'll be very happy. Thanks
  4. Try to use the <a href="http://en.wikipedia.org/wiki/HTML_Tidy">HTML Tidy</a>
  5. Hi guys, I'm creating my mini framework for fast development, and I think is very useful the Scaffold thing and the CRUD thing, but I step in some fields like: If I have an field on my DB table that is need to be an file upload (to the filesystem), how I'll handle it on the Scaffold? If I have an field on the other table that must be setted according some field statement? If I have to change an unique field on the table referring the ID? If you have some step on the Scaffold thing, post here for we discuss and try to make one solution. I want some people to think and discuss about it, if we done some Scaffold class that supply us all necessary requests to build the backend of the application, it will be very nice for all of us, will make our life easier. Thanks and sorry about my English.
  6. You must set the encoding of the database as UTF-8 and the database fields as UTF-8_General_CI Your PHP page you must save as UTF-8, and in the HTML Header, you must set the content as UTF-8. It should work. But for a test, you can just set the page character manually by pressing in your browser: View->Character Encoding->Unicode (UTF- or whatever encoding you will use.
  7. You can simply verify if the page that user is in, is the same of the session on the user ex: <?php //... if ($_GET['id'] != $_SESSION['id']) { die('You are trying to cheat you little bastard'); } //YOUR PROTECTED PAGE CODE HERE //... ?> I think it is the best and more secure way to pass data through GET URL without people cheat your code.
  8. Sorry, by BIG MISTAKE. Registry var = $registry Var called = $register that print out an strict error. But thanks all comments
  9. Hey guys, I got one Strict Standards message in my application. I think, better than explain is show what is happening. I Got the following Class (Registry class) <?php class Registry { private $vars = array(); public function __set($varName, $varValue) { if (!isset($this->vars[$varName])) { $this->vars[$varName] = $varValue; } } public function __get($varName) { if (isset($this->vars[$varName])) { return $this->vars[$varName]; } } public function __unset($varName) { if (isset($this->vars[$varName])) { unset($this->vars[$varName]); } } public function __isset($varName) { return isset($this->vars[$varName]); } } ?> In some file (ex: index.php) I got the following piece of code: <?php ... $registry = new Registry; $registry->Mysql = new Mysql; // <<< LINE 27 ... ?> But I got the following message: Strict Standards: Creating default object from empty value in index.php on line 27 I know that I can change the error reporting thing, but I like my App running very well. Found it on PHP Bugs: http://bugs.php.net/bug.php?id=42852&edit=1 My PHP version is 5.2.3 running on Windows Someone knows what is happening? Thanks at all.
  10. Nevermind, I'v just created an Function inside Router that get the segment by the number <?php public function GetSegment($Seg) { $Route = (empty($_GET['route'])) ? '' : $_GET['route']; $Route = trim($Route, '/\\'); $Segments = explode('/', $Route); return $Segments[$Seg-1]; } ?> So inside the View function inside Controller_Member I'v added It: <?php print $this->Registry['Router']->GetSegment(4); ?> Thanks
  11. Sup, verry good. I'v tested that, but if I want an dynamic thing like: members/view/123 (123) is the ID that I'll get on DB. What I'll do?
  12. Eclipse + PHPEclipse (For Projects) Vim 7 + Minibufferexplorer (For Some files and rapid edit) Both are crossplataform, runs on Windows, Linux & Mac, so if you change your plataform, you don't will get a problem.
  13. Hello, guys. I got an question, I'm building an application skelecton that I'll use for all others applications I'll develop, "Like an Framework". I got some ideas, but I don't know which design implements. Background: The system will run arround the main class called "Core" This class will have an Method for loading other classes (Singleton), this main class core is used to log errors and others thigs, for example: I got the DB class, when an error occours, it will log on Core. So all child classes is loaded via "Core" and I got this Design: <?php $Core = new Core; $Core->GetInstance('Scaffold'); //Loads the class and create the var object inside the core class $Core->Scaffold->SayHello(); //Method inside Scaffold class. ?> But to use the "Core" inside Scaffold (To call Log & Error functions) I must declare Core as Global. I Want something like that to application be a little more centred, and not have a loads of objects. Question(s): 1 This is an good design? 2 Other design can help me more? 3 There is an other way to optimize it? 4 The "Core" classe would be Global, I know it is not good, what's the better way?
×
×
  • 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.