Skip to content

How to Remove Hidden Characters in PHP

I have following piece of code, which reads text files from a director. I have used a list of stopwords and after removing stopwords from the files when the words of these files along with their positions then there come extra blank characters in place of where stopword exist in the document. For example, a f…

session_start(): Write of lock failed

i’m using memcached in php to handle sessions. But i’m geting a session_start(): Write of lock failed. my php configuration has session.save_handler memcached session.save_path tcp://127.0.0.1:…

PHP Laravel – Allow users to use a custom domain name

I’ve looked through pretty much every single page I could find on the topic, but I’m still bit confused. I have a PHP Laravel 4.0 web site, which is at http://www.mywebsite.com When a user signs up, each user gets their own page http://user1.mywebsite.com I have set the above via wildcard sub doma…

PHP Port Scanning

This may be a duplicate post, BUT I’ve not seen any answer that correctly resolves this. I’m trying to find a php script that can correctly determine the state of a TCP or UDP port. I’ve tried several of the ones I’ve found online and they all return the wrong results. EG: On my local …

laravel foreach loop in controller

i have a problem about looping data in controller (laravel 4). my code is like this: when i want to use foreach to loop for $product result with code like this: the result is returning error Undefined property: IlluminateDatabaseEloquentCollection::$sku so, i try to improvise a little with this code: the code…