On my new Ubuntu system, I’ve managed to get Apache2 up and running for developing my ZendFramework Web Applications… I’ve got my available-sites config working correctly because I am able to …
Fatal error: Class ‘IntlDateFormatter’ not found
I installed WAMP on my local machine. My PHP version is 5.3.3 in phpinfo() but that extension doesn’t exist! 🙁 How can I install this extension without compiling it? Here is just source of it.
How can I divide a date range by number of months?
My dilemma is that if I request more than 6 months or so ( I do not know the approximate number ) from my webservices ( which gets called via JS ), I get nothing back. In other words, I have to limit it to 6 months. So let’s consider this scenario: I need to split this up by 6
PHP – Checking for return false;
Just a quick question – and I’m sure really basic! I have the following code: On the other end of this I am currently doing Is writing the following the same? Which method is the preferred method if both are correct? Thanks 🙂 Answer The triple-equal operator is type-sensitive. So when you check: &…
How to minify php page html output?
I am looking for a php script or class that can minify my php page html output like google page speed does. How can I do this? Answer CSS and Javascript Consider the following link to minify Javascript/CSS files: https://github.com/mrclay/minify HTML Tell Apache to deliver HTML with GZip – this generall…
PHP loop through months array
This should be easy but I’m having trouble… In PHP how can I echo out a select drop down box that defaults to the current month and has options for 8 months prior (even if it goes in the last year). For example, for this month it would default to June and end at November. Answer Alternative for &#…
Session variables are not persisting between page loads
Can someone tell me why the session vars are not passing between pages? They were working up to 2 days ago. Now its not? There is a third party system that logs users in based on the third party …
Can’t delete php set cookie
I’ve set a cookie through this call in php setcookie(‘alert_msg’, ‘you have the add badge’); I have tried unsetting it this way setcookie(‘alert_msg’, ”); setcookie(‘alert_msg’, false); setcookie(‘…
Restriction based on IP ranges
I am building an admin panel. and I want to block certain IP ranges. I’m testing this on my localhost wamp server but ir doesn’t seem to redirect me. Any input is appreciated. Answer Is sufficient to use string comparison Update: Taken from the comments of inits answer Suppose i want to block any …
How to prevent users from copying content from website
Is there any way to prevent users from copying content from website and display encrypted code in view source? I know that techies will always find a way but if it prevents normal users it’s OK.