Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
You can just take it out of the framework. ZF can be used as both a library and framework.
-
I use Zend_Config which has read/write support for PHP arrays, INI files and XML files.
-
Which PHP-Editor do you think is the best?
Daniel0 replied to briananderson's topic in Miscellaneous
I'm working on a fairly large project where a lot of the CMS code is a mess. Being able to Ctrl-click on class and method names to go to the source and auto completion is god-send. -
Which PHP-Editor do you think is the best?
Daniel0 replied to briananderson's topic in Miscellaneous
How can it know if you want a semi-colon? Either way, it's considerably more useful for the various types of brackets where you may have multiple nested levels. Ever tried writing even something trivial in Lisp/Scheme? I'm sure you would appreciate bracket matching and bracket completion. Even in PHP it can be nice to ensure that you have the correct amount of brackets. -
Since when did Google block access to noobs?
-
As nrg_alpha mentioned, please do not bump your topic so quickly. I've removed the excess amount of posts you've created.
-
Yeah the manual tag is one we added.
-
Yeah, sorry about that. My bad. Well, it's quite simple actually. You are by default always ascendingly, and because 0 comes before 1, the stickies come before the non-stickies.
-
You can do ORDER BY IF(`Status` = 'sticky', 1, 0), but I would still recommend the former approach. Less table fields doesn't necessarily mean a better designed database. Now what if you want to lock it, or have another type of status? It would be completely sensible to have a topic which is both sticky and locked.
-
MTA means mail transfer agent, and you install it by searching for a such one using Google, downloading it and double clicking on its installer executable.
-
Ask the user whether DST applies or detect it automatically based on the rules for that (they differ based on where in the world you are, and some countries don't use it).
-
I'd recommend storing the "stickiness" in a field called e.g. is_sticky (tinyint) instead for a couple of reasons: 1) It's faster to compare integers than strings. 2) Data integrity - it's easier to ensure that it's either 0 or it is not, than it is to ensure it's a specific string. 3) When fetching your data you could then easily sort descendingly by is_sticky, or whatever you choose to call it, which should solve your problem.
-
Well, in a nutshell, the idea in the topic I linked to revolves around this header: header( "Content-Disposition: attachment; filename=".basename($file)); It tells the browser that the file is to be downloaded. You could probably modify the script to include something like that.
-
Without having checked out the script, this topic might be of use to you: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html
-
It's short for teletype. It's also a tag in HTML: http://reference.sitepoint.com/html/tt
-
Sorry, yeah.
-
While I haven't looked very deeply in Live's login form, I know that Yahoo hashes the password when submitting the login form (see: http://www.phpfreaks.com/forums/index.php/topic,249568.msg1169539.html#msg1169539). If you check the form then you'll see that the Javascript function OnSigninSubmit() is called when submitting the form. Maybe they do something similar.
-
Plus display_errors should be turned off on a live server (though still with error_reporting = E_ALL).
-
Or you could just do $matchedInfo = $matches[1]. That would be easier
-
how to change the name of images with different extensions
Daniel0 replied to php_guest's topic in Regex Help
php_guest, it's no longer needed to seed the PRNG in PHP. -
picking results of an array walk-through -- help!!
Daniel0 replied to stevieontario's topic in PHP Coding Help
When iterating over the array, just insert the rows as you go. -
Though you might of course just want to do $page_id = 'news_' . $cid; unless you're going to use $news for something else.
-
Or alternatively: echo preg_replace('#\.0+$#', number_format($row->p1, 2));
-
Use MySQL for that instead. See this topic: http://www.phpfreaks.com/forums/index.php/topic,125759.0.html