Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. http://www.php.net/m...refs.crypto.php
  2. I suggest you post your issue on an MS site. I don't see how this is a PHP issue / question.
  3. IS there a particular reason your running php under cgi as apposed to an Apache module? I would think the later is a more robust solution.
  4. Of course. You just need to configure your server to parse a .css file as php, or serve .php files as the css content type.
  5. Set a variable in Window's (cmd) shell and see how long it lasts too. The issue seems to be between the keyboard and the chair.
  6. PHP does not natively support the concept of "Mods" so without further details about the app your using this with no one can help you.
  7. Have you looked at the Date & Time Functions? That's the best place to start.
  8. Because that is how php works. They're not. No idea, that is a YII thing not a php thing.
  9. trq

    New To Php

    1. The basics, yeah. 2. Probably not right now.
  10. trq

    Eval() Error

    If your just learning php forget eval exists.
  11. None of that is OOP's fault. The same story could be told using simple functions. One very powerful feature of OOP that tends to get left out of these arguments is inheritance. Without inheritance you tend to have to repeat a lot of code in larger systems. Thus making them even larger and harder to maintain. For instance, where I work, we currently have about 2.5M lines of code (not all PHP) spanning around a dozen apps. We have a base framework and data layer that defines interfaces and implements a lot of the lower level functionality. Now, while each app has the concept of a *user*, and each app has very specific *things* these users need to *do*, they don't all get written from scratch for each application. They typically inherit functionality and properties from further up the tree. This is just a small example of a *part* of our data layer. *Users* make up only a tiny part of our applications. I'm not even touching on stuff like routing or input validation or utilities such as those we use to keep track of changes to our development databases. We have an entire in house framework that handles producing documents in a reliable format fir printing. This framework alone has probably 60 - 80 *elements* that all extend off of a *base* element type. This sort of thing is much harder to do well using procedural code. We have all sorts of functionality spanning multiple applications and classes. Without OOP we would have to duplicate a lot of code and have a lot more trouble maintaining such a massive code base. Now, having said all that. OOP is *NOT* the be all and end all. A lot of projects / programs don't require this level of complexity. When they do OOP can often play a *part* in the solution. Procedural code however always has a role to play.
  12. Sorry, I'm really not sure where exactly you are stuck. The button the user clicks would need to submit a request to the server containing the id of the comment they wish to flag. A very simple example: comments.php some comment blah blab blah <a href="flag.php?id=22">flag as spam</a> flag.php <?php if (isset($_GET['id'])) { // execute your query }
  13. When the user clicks the *flag* button, update the *flag* column in the database.
  14. It's pretty straight forward. At it's simplest, a user clicks a report button, a record is added to the *reports* table that stores the id of the thing being reported. You then simply display a list of these reports wherever you like.
  15. Where exactly are you stuck? Do you know how to insert data into a database?
  16. It doesn't really violate any rules. You don't look real bright though, posting a topic so fare off topic as your very first post.
  17. ps: This subject is currently being discussed here: http://forums.phpfreaks.com/topic/270884-object-oriented-programming-or-traditional-coding/
  18. If you don't already know OOP and your already erring on the procedural side stick with that. Badly written OOP is worse than well written procedural code.
  19. trq

    Modifying Bootstrap

    As the name suggests, CSS cascades, just override bootstrap's stuff with your own.
  20. Google some tutorials on pagination. This is a very common problem.
  21. If there are slashes being saved in your database then you are adding to many when you are escaping your data. Are you checking to see if magic quotes is enabled?
×
×
  • 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.