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 7932357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:59:32+00:00 2026-06-03T20:59:32+00:00

When I try to upload a php file on my server I get a

  • 0

When I try to upload a php file on my server I get a message: "Parse error: ..." I know what that means, but the problem is something else.

If I edit the file on my local server (I XAMPP installed on my computer) everything is fine.
But if I upload the same file online (Hosting at Godaddy) all code is displayed in one line. I have tested this by downloading it from server and then in Notepad++.

For example my code looks like this:

<?php
     //my comment 
     echo 'First';
     echo 'Second';
?>

But is displays:

<?php //my comment echo 'First'; echo 'Second';?>

So, now //my comment breaks all my code.

I can’t find a solution for this. Please help.

  • 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-03T20:59:33+00:00Added an answer on June 3, 2026 at 8:59 pm

    Use an editor like Notepad++ for editing your code.

    There are two possibilities. Godaddy server you are having is on Windows and you are on a Unix based system. And the Other way around.

    In short, \r\n breaks used in UNIX is not actually compatible with \n breaks used in Windows. So use an editor like Notepad++ which has a preference to save with \r\n breaks by default.

    Edit:

    Try switching the transfer mode from Binary to ASCII as well in the FTP program you are using. Usually FTP softwares are supposed to cross support the text files on the host and client during the transfer.

    Edit 2[ Thanks @Wesley Murch ]

    For easy switching of EOL(End of Line) Format : Edit -> EOL Convertion -> Windows Format

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

Sidebar

Related Questions

I have this code that i use to upload files on the server. But
I am trying to upload file to a php server from my android device.
hi all i am trying to upload image file from sdcard to php server
I am trying to upload file on HTTP server using POST but when I
I try this command to upload a file (standard.xml) into table book the file
Try as I might, I can't get a JNLP file to run locally (via
I'm trying to upload a file to my server using the CakePHP file upload
Hello everyone I been trying get php uploader working but having a lot of
PHP Uploading issue Getting Error 0 but move_uploaded_file() is returning false. When I print
I found a multi file upload script here. When I try to upload the

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.