trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
http://www.php.net/m...refs.crypto.php
-
What is your question / problem?
-
I suggest you post your issue on an MS site. I don't see how this is a PHP issue / question.
-
Server Keeps Taking “Dumps” Every 10 Or So Minutes, Why?
trq replied to Chrisguy12's topic in Apache HTTP Server
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. -
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.
-
How Do You Change The Default Editor From Vi (Centos)?
trq replied to tibberous's topic in Miscellaneous
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. -
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.
-
Have you looked at the Date & Time Functions? That's the best place to start.
-
Because that is how php works. They're not. No idea, that is a YII thing not a php thing.
-
1. The basics, yeah. 2. Probably not right now.
-
Look into event delegation. Google it.
-
If your just learning php forget eval exists.
-
Object Oriented Programming Or Traditional Coding?
trq replied to mostafatalebi's topic in PHP Coding Help
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. -
Stdclass Object.. Need To Sort By Ip And Then By Date Within Ip
trq replied to newbornultra's topic in PHP Coding Help
Why don't you sort all your data in your query first? -
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 }
-
When the user clicks the *flag* button, update the *flag* column in the database.
-
I'm not sure I understand that comment.
-
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.
-
Where exactly are you stuck? Do you know how to insert data into a database?
-
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.
-
ps: This subject is currently being discussed here: http://forums.phpfreaks.com/topic/270884-object-oriented-programming-or-traditional-coding/
-
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.
-
As the name suggests, CSS cascades, just override bootstrap's stuff with your own.
-
Google some tutorials on pagination. This is a very common problem.
-
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?