Upload does not work online, it appears on the screen part of the code of the Upload class

Asked

Viewed 72 times

3

I created a project in PHP using the Codeigniter that uploads an image to the server. Locally it works perfectly, but online, hosted on a Locaweb server (Windows platform) shows an error, when I upload part of the class Upload, the pure source code!

I don’t understand, I’ve looked through the file and I can’t find any problems, but I’ll keep looking. I just wish I knew how this is possible, the source code shouldn’t be hidden forever?

  • 1

    This will depend on the server configuration, have server that actually hides the errors, but, have servers that this ta open, maybe an opening call resolves. About the mistake you can put for us to help you is very peculiar maybe a simple "." point solves!

  • 2

    Thanks for the tip, I discovered the problem, the Uplaod class had not been sent in full, IE, it was half, the funny thing is that other Uploads worked only this one that did not.

1 answer

3

When part of the source code is displayed on the screen, it means that your code has the short_open_tag <? and on the server this directive is disabled. To resolve this change all occurrences of:

<?

for

<?php
  • truth !!! the staff always does with short_tag and this may be his mistake as well remembering.

  • 2

    Good thing I was always conventional :), never used short_tag.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.