- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 124
- Posts with Upvotes
- 110
- Upvoting Members
- 59
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
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,…
Re: 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 \ | |
Re: 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 … | |
Re: 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? | |
Re: @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 … | |
Re: `$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 … | |
Re: @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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: @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 … | |
Re: How about you show us the code you're using so we can formulate a solution. | |
Re: 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? | |
Re: 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, … | |
Re: 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. | |
Re: 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 … | |
| Re: 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. |
Re: 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. | |
Re: 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] | |
Re: 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. | |
Re: 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? [*] … | |
Re: Do you possibly have cookies disabled in FF and have php configured to use a cookie to store the session id? | |
Re: 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. … | |
Re: 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. … | |
| Re: 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 … |
Re: 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 … | |
| Re: 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 … |
Re: 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 - … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … |