Posts
 
Reputation
Joined
Last Seen
Ranked #157
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
99% Quality Score
Upvotes Received
124
Posts with Upvotes
110
Upvoting Members
59
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
52 Commented Posts
7 Endorsements
Ranked #260
Ranked #159
~255.98K People Reached
About Me

15+ years experience in designing highly scalable web-based distributed infrastructure.

Interests
PHP, Python, Golang, MongoDB, Redis, MySQL, jQuery, XML, XSLT, ZF, Symfony2, Scalability, Systems Architecture,…
Favorite Forums
Favorite Tags
Member Avatar for gunnarflax

I believe what you are looking for is autoloading, which php does have. [url]http://php.net/manual/en/language.oop5.autoload.php[/url] As far as the :: are you referring to the context of self:: static:: etc or are you referencing namepspaces as the use of :: in namespaces was dropped in lieu of \

Member Avatar for odeskavita
1
534
Member Avatar for opjjuly

If your webhost does not support .htaccess and the web server is Apache...move to a better host. If your webhost does not support .htaccess and the web server is not Apache, look to see what type of url rewriting it supports. If you still can't...move to a better host. .htaccess …

Member Avatar for mervin_2
0
848
Member Avatar for Dani

What is the purpose of flushing the output buffer in a controller? Are you trying to use codeigniter in an HMVC fasion and include one controller within another?

Member Avatar for Dani
1
4K
Member Avatar for benjaminFowl87

@Full Spectrum Its not an untyped language it is a loosely typed language. You can cast values to a particular type and do type comparisons if you want/need too. @benjaminFowl87 Unit testing is a very powerful mechanism for development, but in my experience it is a different mindset than just …

Member Avatar for amit005
0
816
Member Avatar for ceeandcee30

`$dteStart->diff($dteEnd);` returns an instance of [DateInterval](http://php.net/manual/en/class.dateinterval.php) If you want the hours from the DateInterval object you can use either of these formatting options, depending on the output you want and a call to [DateInterval::format](http://php.net/manual/en/dateinterval.format.php) ( string $format ) > H - Hours, numeric, at least 2 digits with leading 0 …

Member Avatar for ceeandcee30
0
416
Member Avatar for anirban1087

@jkon I believe the OP is using MPTT (Modified Preorder Tree Traversal). sitepoint has a good example of this: [url]http://articles.sitepoint.com/article/hierarchical-data-database[/url]

Member Avatar for Rishos
0
5K
Member Avatar for tapuwa2002

Stop doing the insert in the loop. This is easily solved by using the loop to generate the insert query and then execute 1 query instead of 10000. PDO Prepared Statements Executes 10000 statements Execution Completed: 10.082677841187 seconds [CODE] $db = new PDO( 'mysql:host=127.0.0.1;dbname=examples', 'username', 'password', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES …

Member Avatar for cereal
0
3K
Member Avatar for calebcook

Since I just wrote this code answering your first question: [CODE] <?php //Create an instance of now //This is used to determine the current month and also to calculate the first and last day of the month $now = new DateTime( 'now', new DateTimeZone( 'America/New_York' ) ); //Create a DateTime …

Member Avatar for Adriano_1
0
4K
Member Avatar for chaitu11

It sounds like you have a file with 10000+ lines in it, that you need to split into 50 line chunks and save to new files... If the file is well over your php memory limit, reading the whole thing into memory will only cause you headaches. I'd highly suggest …

Member Avatar for chaitu11
0
238
Member Avatar for eshko

@essential I may be wrong, but wouldn't the onblur event mean the field needs to lose focus? If its auto-submitting the form then it should probably wait for a delay indicating the user has finished typing. Something like the solution posted in the comments on this site: [url]http://www.openjs.com/scripts/events/check_after_typing.php[/url] works very …

Member Avatar for murat.ozkan.9028194
0
6K
Member Avatar for nalini@121
Member Avatar for alfredferg

Is the file of a variable length, where you do not know the total number of lines, or will the file always have a fixed number of lines?

Member Avatar for santoshv22
0
2K
Member Avatar for soumyakollon1

PHP is a server side language. It does not have access to the client machine. If you wanted to do something like this, you would need some kind of client based code (flash or java probably) which could possibly use php to drive some of the underlying functionality, chat, logging, …

Member Avatar for ssdwd
0
1K
Member Avatar for ashafaaiz

If you have server access or a hosting company that will install libraries for your use then a great PHP option is to use [Snappy](https://github.com/KnpLabs/snappy) it wraps the [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf/) library and the [wkhtmltoimage](http://code.google.com/p/wkhtmltopdf/) library.

Member Avatar for agent21
0
662
Member Avatar for kcrazy

Personally I like Zend. It is actively developed, built around the bleeding edge features of the language and has constantly been improving. My biggest issue with CI is that it was built to support PHP4. To my understanding and from what I have read that means it uses some workarounds …

Member Avatar for jkon
0
436
Member Avatar for ovidiu_b13

I agree with jkon, the only caveat is needing a browscap.ini which isn't packaged with php by default. This can only be set in the php.ini or httpd.conf files.

Member Avatar for diafol
0
5K
Member Avatar for dany12

I used to be a big advocate of Eclipse and/or Zend Studio, but I've since switched to Sublime Text 2 and could not be happier. However, its more of a text editor than a traditional IDE.

Member Avatar for diafol
0
187
Member Avatar for veledrom

You need an extension that is built for 5.3 and VC6 and is thread safe version [url]http://downloads.php.net/pierre/php_printer-svn20100319-5.3-vc6-x86.zip[/url]

Member Avatar for crazy_chanaka
0
2K
Member Avatar for Sahil_Ar

Completely agree with vinayakgarg. Packages like vBulletin have years and years of development by a team of developers. But don't get discouraged. Put the time in and learn the tools you'll need and you'll be creating great applications before you know it. But, you have to learn the tools first.

Member Avatar for klaipedos
0
225
Member Avatar for captian

If you're going to evaluate a host, look less at the features and more at the infrastructure. If you are looking at a shared host or a reseller account than some important things to consider would be: [LIST=1] [*] Is your data protected by some kind of RAID array? [*] …

Member Avatar for anil22ece
0
349
Member Avatar for gagan22

Do you possibly have cookies disabled in FF and have php configured to use a cookie to store the session id?

Member Avatar for lieky
0
1K
Member Avatar for epicrevolt

I have used LiquidWeb and recommended to it many people for everything for shared, vps, dedicated, virtualization etc etc. In years of service I have never personally experienced a LiquidWeb outage. If you check out WHT they have great reviews and used to be very active members of that forum. …

Member Avatar for giffy
0
414
Member Avatar for dangerousdayton

The OP is not generating a pdf...the OP is creating an FDF document and specifying a form fillable pdf that loads with the populated data. -dangerousdayton When I have generated xFDF the xml version of fdf, the checkboxes have all been setup as unique fields, e.g. Payment_Visa, Payment_Mastercard, Payment_Amex etc. …

Member Avatar for Kristof_1
0
3K
Member Avatar for diafol

Alright, I'll bite the bullet and throw some fuel on the fire. Having more than a decade of php development under my belt now, I've run the gamut of template engines. I've even spun a few of my own over the years, but alas I've settled back into using purely …

Member Avatar for rajppd
0
955
Member Avatar for jkon

My results are right on par with what you are seeing. Reflection is about twice as slow as using variable variables. I also benchmarked call_user_func and found that to be just about on par with the variable variable calls. I can't say I've seen reflection used as much as I've …

Member Avatar for bato3
0
457
Member Avatar for bratbo

If you want the currently executing PHP file you can use the magic constant \__FILE__ (http://php.net/manual/en/language.constants.predefined.php) which will give the filesystem path. OR If you want to link to the current file in a url fashion you can use $_SERVER['PHP_SELF'] (http://php.net/manual/en/reserved.variables.server.php) e.g. if the url is http://www.domain.com/script.php then $_SERVER['PHP_SELF'] will …

Member Avatar for ishan1211
0
5K
Member Avatar for flynismo

For the sake of learning. I think you're whole architecture and thought process on this is wrong. There is a complete violation of single responsibility in all of your classes. We can quickly break this into three responsibilities. 1. Entity\Member - an entity which models a member 2. Validator\Contact - …

Member Avatar for mschroeder
0
380
Member Avatar for Venom Rush

Using the idea of a Honey Pot has always been a pretty effective way to prevent comment form spam. Basically add one or more additional form fields that are hidden to the browsing user that should always be blank. When a form is submitted with those fields filled in, reject …

Member Avatar for Venom Rush
0
178
Member Avatar for dany12

From a high level, your class is trying to accomplish to much in a single place. Check out the concept of SOLID (http://www.freeklijten.nl/home/2012/03/23/SOLID-The-S-is-for-Single-responsibility) What you should ultimately end up with is a set of classes that allow you to work with emails in the most generic of ways. An Email …

Member Avatar for dany12
1
127
Member Avatar for drjay1627

While a threaded set of comments like this is probably best handled by a NoSQL database the necessity to deal with them in a relational database has exsisted for some time. I would suggest looking at either Path Enumeration or a Closure Table to properly model a threaded conversation to …

Member Avatar for mschroeder
0
195