trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
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.
-
How to have different header.php based on the user logged in
trq replied to vraghav's topic in Applications
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. -
How to make a function start, without waiting the previous one to end..
trq replied to Oguzz13's topic in PHP Coding Help
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. -
How to have different header.php based on the user logged in
trq replied to vraghav's topic in Applications
See if. -
How to make a function start, without waiting the previous one to end..
trq replied to Oguzz13's topic in PHP Coding Help
You might also take a look at the react php framework. http://reactphp.org -
Authenticate to Gmail in PHP without including Mail.php
trq replied to bobcowher's topic in PHP Coding Help
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.- 2 replies
-
- php
- authenticate
-
(and 2 more)
Tagged with:
-
See copy.
-
FormToEmail not reading any values from table form, <h> </h> in table
trq replied to PrPrO's topic in PHP Coding Help
tldr. -
You have misspelt pixel.
-
Do you have a question?
-
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.
-
Variables are not interpolated within single quotes.
-
What exactly are you trying to achieve?
-
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.
-
It's a simple login script. Do you know any PHP?
-
Im pretty over cryptic posts.
-
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.
-
?
-
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
- 5 replies
-
- calculator
- php help
-
(and 1 more)
Tagged with:
-
Where exactly are you stuck? We're not here to write code for people.
- 5 replies
-
- calculator
- php help
-
(and 1 more)
Tagged with:
-
Help with OOP, calling parent function from child class?
trq replied to sourcy's topic in PHP Coding Help
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. -
Help with OOP, calling parent function from child class?
trq replied to sourcy's topic in PHP Coding Help
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(). -
Help with OOP, calling parent function from child class?
trq replied to sourcy's topic in PHP Coding Help
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.