Skip to content

Tag: php

Invalid or unitialized Zip object

I am getting Warning: ZipArchive::addFile() [function.ZipArchive-addFile]: Invalid or unitialized Zip object. what could be problem? I tried many methods but in vain. I am able to create and initiate download when I select one file. However, I get above error when I select more than one file. Answer The power…

How to scrape SERP with PHP (for small project)

I thought this would be fairly simple but it’s proving challenging. Google uses https:// now and bing redirects to remove HTTP://. How can I grab the top 5 URLs for a given search term? I’ve tried several methods (including loading results into an iframe), but keep hitting brick walls with everyth…

Codeigniter Environment setting

Codeigniter development environment is not setting. I always use this code in index.php. but i don’t understand why i am getting “production” as output while i am working on localhost. Answer That’s strange. It did the exact same thing for me. Could you try something like this?

Laravel 4 where in condition with DB::select query

I have next SQL query: How should I execute this using Laravel? I put this query in DB::select function, but how can I place all ids in “WHERE device_id IN (?)” condition? I tried using “array(implode(‘,’, $var))” but it doesnt work. If I have ids like “13, 14” …

How to turn off notice reporting in xampp?

On a remote server there is no problem, but in localhost (xampp 3.1.) I cannot turn off reporting notices. result: php.ini Any suggestion ? Answer Try to do a phpinfo(); just before your $Fname = $_POST[“Fname”]; line. What’s the error_reporting property value ? See this or this to understan…

WordPress Shortcodes (Possibly Nested & Input)

I’ve been battling with this problem in WordPress particularly with using one shortcode which has a nested shortcode inside it, which works like a charm, however I wanted to make it a simple shortcode which in turn then would be easier for someone to use. You can see the code here The HTML output for th…