Quote:
Originally Posted by melkorz123
It is nice, I would recommend you something as personal advice.
You wrote like a lot of <? ?> in code, and what all you made was an entire php native file so just write it like this <? all code ?>, just open and close 1 time. Also I would use require_once instead of require. Maybe i would just use an include instead of require, since you use require to config.php +1 times... so the code will be in the same place... You never leave it..
Don't take it as a critic, just as a personal advice a job mate makes you:),
|
The PHP opening closing tags is just a style I use, it really comes in handy when you are writing big scripts. AFAIK, it doesn't really slow it down (a lot) since it gets parsed in a whole.
Imo, when you use require somewhere in your script, you use it everywhere.
There could always be a problem that deletes the file you are requiring.
For example, you are running this tool, incase you delete the file when you are still in the 'postRequest' function, the next time you run it should give an error saying that it can't open it. Because else, it could confuse the user.
Again, I just prefer it this way.
Thank you for the comments though!
26 downloads (forum attachment), 12 thanks. What a thankful community! (sarcasm intended)