Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. 1) Use Github. This allows devs to send pull requests of there work, these can then be reviewed before merging into the main branch. (Considering your using Atlassian, they have a product called stash that does similar) 2) http://travis.ci is my prefered tool. 3) See above. 4) Massive question. I would have assumed being in your position this would be one of your existing skillsets. 1) Client don't usually need to know the technical side of what your working on. 2) Git & Composer are great tools, you might find a simple solution is best.
  2. For a client? You mean someone is paying you to figure this out? An if statement will allow you to change the execution path within your program. This allows you to make choices based on different data. It's a simple concept: if ($that) { // do that } else { // do something else } Now, all you need to do is figure out what data you need to check in your conditions and what code to execute when your checks pass.
  3. As was already said, you shouldn't use pcntl_fork within a web environment. It is a framework written in PHP for event driven, non blocking I/O with PHP. It's modeled in part on node.js.
  4. You might also take a look at the react php framework. http://reactphp.org
  5. Mail::Factory and Mail.php are not a standard part of PHP. So, the answer is yes. Assuming the code within Mail.php and/or the code within the class produced by calling Mail::Factory is capable of doing so.
  6. See copy.
  7. It's not executing afterward, but is displaying afterward. The view layer uses various pieces of buffer trickery to do it's job. Hence, output outside of a view is not recommended. What exactly is the issue you are trying to solve?
  8. xhprof is a decent tool for profiling what code is called on a request. ps: 10000 lines is nothing, we have over 2.5M lines of code at work, very little of which is documented.
  9. Variables are not interpolated within single quotes.
  10. What exactly are you trying to achieve?
  11. trq

    ASP to PHP

    Really? I need to write this for you? Where exactly are you stuck? It's a very simple script. Instead of checking eof, just check the count of your results. eg; mysql_num_rows() to see if you have found a match with your query. It really is a very simple login script. I'd simply forget the asp, and write your own in php. It's not like it's a particularly well written example of asp anyway.
  12. trq

    ASP to PHP

    It's a simple login script. Do you know any PHP?
  13. My point exactly. The code example you posted and the topic of your question seem unrelated. Do you want to pass data to a php cli application? Ask that fucking question! What that has to do with some server written in C is beyond me.
  14. You need to read some basic "starting php" tutorials if your here asking such questions. This is a good place to start: http://www.tuxradar.com/practicalphp
  15. Where exactly are you stuck? We're not here to write code for people.
  16. Getting closer. I would get rid of all of those static calls to Database. They are making your user class tightly coupled with some Database class. Also, you should implement type hinting like in my example. You really should define a Database interface though, and type hint to that interface.
  17. Assign it to a property: public function __construct(Database $db) { $this->db = $db; } You can then access it within the User class using $this->db. So, to execute query() you would use $this->db->query().
  18. The biggest issue: A User is not a type of Database, it therefore should not extend it. You should be passing your database object into the User object so that it can use it.
×
×
  • 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.