Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8688829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:28:36+00:00 2026-06-12T23:28:36+00:00

I am using PHP to generate a csv file with a first name and

  • 0

I am using PHP to generate a csv file with a first name and second name.

On my local XAMPP server it works fine and generate this output.

Andy,Murray
Sarah,Palin
Bob,Saget

However on this 000webhost.com free webhosting site I get the following output.

    <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br />
<b>Warning</b>:  array_walk() [<a href='function.array-walk'>function.array-walk</a>]: The argument should be an array in <b>/home/a2806375/public_html/csv.php</b> on line <b>15</b><br />
<br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table>
<!-- Hosting24 Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<!-- End Of Analytics Code -->

This is my code:

function outputCSV($data) 
        {
            $outstream = fopen("php://output", "w");


            function __outputCSV(&$vals, $key, $filehandler) 
            {
                fputcsv($filehandler, $vals); // add parameters if you want
            }
            array_walk($data, "__outputCSV", $outstream);
            fclose($outstream);
        }



        $result = $db->fetch_array($result);

        header("Content-type: text/csv");
        header("Content-Disposition: attachment; filename=guestlist.csv");
        header("Pragma: no-cache");
        header("Expires: 0");


        outputCSV($result);

Why is it doing this?

Is it because its a free hosting site and they are trying to put advertising in a CSV file?

How do I work around, I am a bit low on money atm so I cant afford a paid server.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:28:38+00:00Added an answer on June 12, 2026 at 11:28 pm

    Disable the insertion of their analytics code from their control panel:

    http://members.000webhost.com/analytics.php

    From: http://www.000webhost.com/forum/faq/7894-faq-frequent-ask-questions-guide.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using PHP to generate images and this works fine. I am having
I'm using a PHP script to generate an excel CSV file from a result-set
I'm using PHP to generate feeds, which is working perfectly fine on my local
I am using the following code to generate excel from sql through php.this is
So, my code generates a CSV file using PHP's built-in fputcsv function. For the
I am exporting a SQL Server table to a CSV using php (see code
I am trying to generate a CSV file containing the name and email address
I am generating a simple csv file using php. The file contains some user's
I actually want to generate random password using PHP uniqid() function $randomPassword = uniqid();
I am using CherryPy to generate and parse data for a php webpage, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.