Jump to content

gorgo666

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by gorgo666

  1. DarkWater, sorry for the late reply, and I'm sorry I did snap at it but to be honest there was nothing too challenging about my question. I asked it because I personally believed I had exhausted the "Read The Manual" routes. If I hadn't have read the manual in the first place, I wouldn't be here because I wouldn't have managed to get a basic Zend set up going... My annoyance doesn't necessary come from someone saying "read the manual". The reason I got so bloody annoyed is because of Ignace's attitude. There are many ways to get your point across and sometimes saying "if you cared to read the manual you'd know..." etc isn't the best way to do it. If, however, he/she had told me "well you could check out xyz section of the manual, that should help you out"... I can see your point, and I agree. Can you see mine?
  2. I do use Google and that's why I utilise all three of those links you mention, however I considered my problem to be reasonably specific so thought that someone could have helped on these forums. However, sadly, the membership seems to be partly comprised of arrogant, unhelpful people such as yourself who quote things such as "use the search" or "use Google"; or in this case "use the manual". I suppose that this behaviour can be expected with the advent of the forum but it's annoying nonetheless. Forget about it, problem still unsolved.
  3. Well no thanks for an extremely arrogant, ignorant and sarcastic reply. I do read the manual, but I do apologise for not having a 110% understanding of the subject as you obviously do.
  4. Hi all I'm just messing around with Zend, trying to get to grips with it. I've created a little application with a fully working login system. I'm just implementing code to stop people from referencing URLs directly, because the current set up means that even if they aren't logged on, they can get access to specified page. I'm aware how to do this - I can simply add something along the lines of: function indexAction() { if ($this->authenticated) { // Render page } else { // Redirect to login $this->_redirect('/auth/login'); } } But, I have a controller called Customer that has several actions - index, add, edit and delete. In the above code snippet I have added in the code for the index action, but if you navigate to http://site/customer/edit or /add or /delete, you can still get through. Because I'm lazy, and I can't be bothered to repeat the code for each action, is there a way I can extend it through the entire controller to save time?
  5. Thanks for the reply. Well, I found the problem, about 5 minutes after posting this topic (isn't that always the way, though). Problem: When I had previously installed PEAR using the go-pear installer from the Terminal, it had added a property right at the very bottom of the php.ini file that read something like include_path "/usr/local/pear" Voila, removing that line meant that the cheeky PEAR line stopped overriding what I put. Also, in case anyone is wondering, if you want to refer to multiple include_paths in your php.ini file (for example, if you are running Zend and PEAR) you need to use the following syntax: include_path ".:/Path/to/include:/Another/path" That works on *nix based OS and Mac. It's different for Windows (use a semi-colon as the path divider, rather than colon). Best of luck.
  6. Hi all. Hopefully someone will know the answer to this because otherwise there's gonna be a brand new Macbook Pro being smashed against the wall soon. Theproblem - whatever and I mean whatever I put in the include_path directive of php.ini for my installation of XAMPP get's COMPLETELY IGNORED. phpinfo() reveals that the loaded ini file is the one I've edited at /Applications/xampp/etc/php.ini but STILL it refuses to pick up my include_path line... And yes, I have uncommented the line. Someone please please pretty please help before I end up doing something unpleasant!
  7. Net Beans. I use it for Java as well as PHP and I cannot fault it. I'm a Mac user by the way, so it's great to have software that runs on Windows and Mac, as I use it in the Windows based labs at University too. Before you ask, yes, I have used Eclipse but I just find Net Beans accomplishes near enough the same task, but much more simply.
  8. Err double post, lol, I posted on the other topic.
  9. Ummm not that I know of personally. I know that you can refer to properties and methods within a class without having to instantiate the class using the :: operator, I think. And I know that you could use abstraction to create a class with protected fields that cannot be directly instantiated as an object, but rather only extended by child classes... Hope that helps.
  10. It's natural to be confused, as programming is. But honestly, if you look at those articles, as provided by the moderator, they are pretty much the simplest explanation I have seen to OOP PHP. I admit yes, it is confusing, I get confused with inheritance, abstraction and bits like that, but the basic concept of classes is very, very simple. Just take a very simple example... You have a mobile phone, I presume. Imagine a class called MobilePhone. This can be "instantiated" by writing $myPhone = new MobilePhone() . You now have an object, assigned to $myPhone (a variable in PHP, I'm sure you'll know). You could now perform methods, which belong in that class, such as $myPhone->dial(123); or $myPhone->sendsms(...); and so on. Classes, I think, are just a way of organising things. I apologise if any syntax I've provided here is incorrect. This is a bit rushed. But seriously, those articles cover it all.
  11. This guy is obviously a wind up. I could write a book on benefits of object oriented programming, and I'm new to the idea, since only dabbling since September 2007. But it's late, and what's the point when this guy will find some way to shoot whatever I write, out the sky anyway. Hehe
  12. Hello It's late in the UK and I may be a long way off, but seeings as donations would probably require a user to be logged in to send / receive a credit anyway, couldn't you just use two database tables ... one for user_id, username, password and a second for credits, in which you could house a list of credit transactions, dates/times and so on. Then you could run a total using PHP to ascertain the status of their "account" if you like. Hell, if you're feeling adventurous, you could write your own Credits class and have methods to insert, update, remove, fetch credits and so on. Like I say, I may have completely mis-understood your post but hope I can be of help in some way regardless
  13. I don't quite understand your question, but I was sure that REMOTE_ADDR was the only thing you needed to do, as you put there.
  14. Problem solved. On a Mac 10.5.4 Leopard, you have to update the config file in /etc/apache2/users/fredbloggs.conf to: <Directory "/Users/fredbloggs/Sites/"> Options All AllowOverride All Order allow,deny Allow from all </Directory> Hope this helps anyone with a similar issue.
  15. Thanks for the reply! Sorry about the double post by the way, was an accident. I've tried this out but it doesn't seem to be working. I wrote some PHP first to test it, at a very basic level: <?php /** PHP BOOTSTRAP FILE ****************** Provides the include to the relevant URI based on the parameter **/ if ($_GET['page']) { $page = $_GET['page']; } else { $page = "home"; } // If nothing passed, then give the home page echo($page . ".php"); ?> As you can see, if you type http://test.dev/?page=about, the browser echos out "about.php". If you don't specify anything, "home.php" is echoed. I also made a .htaccess file in the directory with this index.php file (I'm using Mac so it's ~/Sites/test.dev), and in htaccess I put: RewriteEngine on RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L] But instead when I put http://test.dev/about, I simply get a "page cannot be found" error, so I don't think the rewrite is working at all. What have I done wrong? Have I put the htaccess file in the wrong place? Thanks for your help ProjectFear.
  16. Very smart. I'll have to have a sit and play later with a coffee. Cheers for that. I'm guessing once you've passed the action through GET with mod_rewrite, a simple case or if statement would work to figure out the user's target URL from the page variable...
  17. Thanks for the very quick reply. I always thought it was something to do with mod-rewrite. I thought the default mod-rewrite code that Wordpress gives you does the trick, or Zend Framework, as that seems to remove index.php from the end of the URL...? I always thought that until I just tried making a directory for each section of the site such as "site_root/about" and then inside the about directory, I would create an index.php file and everything worked as planned... Out of interest, how would you go about doing this?
  18. Hello everyone. I've beenputting off joining phpfreaks for a lonnggg time but here I am, finally! But anyway. I have a question that I've been pondering for ages, and it may be a little obvious so please don't ridicule me. Most websites now-a-days seem to have completely removed file names from their addresses and navigation. To give you an example, a lot of people may have used http://www.acme.com/about.php but now instead you only see http://www.acme.com/about/ which obviously refers to a directory. It looks much tidier and is really Web 2.0... Can someone elaborate on this? Is it a behind the scenes CMS doing this, like Drupal or Wordpress? Or is it simply people storing an index.php file inside that directory? I look forward to any reply! Cheers guys.
  19. Hello everyone. I've beenputting off joining phpfreaks for a lonnggg time but here I am, finally! But anyway. I have a question that I've been pondering for ages, and it may be a little obvious so please don't ridicule me. Most websites now-a-days seem to have completely removed file names from their addresses and navigation. To give you an example, a lot of people may have used http://www.acme.com/about.php but now instead you only see http://www.acme.com/about/ which obviously refers to a directory. It looks much tidier and is really Web 2.0... Can someone elaborate on this? Is it a behind the scenes CMS doing this, like Drupal or Wordpress? Or is it simply people storing an index.php file inside that directory? I look forward to any reply! Cheers guys.
×
×
  • 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.