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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:48:41+00:00 2026-06-12T12:48:41+00:00

I was running through the tutorial on http://net.tutsplus.com/tutorials/php/online-file-storage-with-php/comment-page-2/#comments and it was working fine until:

  • 0

I was running through the tutorial on http://net.tutsplus.com/tutorials/php/online-file-storage-with-php/comment-page-2/#comments
and it was working fine until:

if(strlen($message) > 0)
{
    $message = '<p class="error">' . $message . '</p>';
}

This line of php is found in index.php. When I few the page in firefox, it looks like the php parser stops at the greater than. Can I escape the character? Do I need to?

EDIT: All the php code:

<?php 
//Load the settings
require_once("settings.php");

$message = "";
//Has the user uploaded something?
if(isset($_FILES['file']))
{
    $target_path = Settings::$uploadFolder;
    $target_path = $target_path . time() . '_' . basename( $_FILES['file']['name']); 

    //Check the password to verify legal upload
    if($_POST['password'] != Settings::$password)
    {
        $message = "Invalid Password!";
    }
    else
    {
        //Try to move the uploaded file into the designated folder
        if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
            $message = "The file ".  basename( $_FILES['file']['name']). 
            " has been uploaded";
        } else{
            $message = "There was an error uploading the file, please try again!";
        }
        }

    //Clear the array
    unset($_FILES['file']);
}


if(strlen($message) > 0)
{
    $message = '<p class="error">' . $message . '</p>';
}    
?>
<html> ... </html> //my html code
  • 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-12T12:48:43+00:00Added an answer on June 12, 2026 at 12:48 pm

    The > won’t cause the PHP parser to stop.

    Without seeing the HTML output by the server, it is hard to say for sure, but since the > is the first > in the file it seems likely that the PHP parser never starts and the browser treats everything between the <?php at the start of the file and the strlen($message) > as a tag.

    You need to access the PHP through a web server with PHP installed and configured to process that file (which is typically done by giving it a .php file extension).

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

Sidebar

Related Questions

I'm running through this tutorial found here: http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm which teaches how to pass a
I am running through a tutorial online at http://www.sthurlow.com/python/lesson08/ and I believe I understand
I'm going through a tutorial here: http://mobile.tutsplus.com/tutorials/android/android-sdk-development/ . I have finished the tutorial and
Hi guys I'm running through this tutorial: http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap and trying to get the code
I've been running through the ASP.Net MVC C# Movie Database tutorial, but been trying
I been going through this tutorial http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx and them make a SP like this
I am running an Ant script that is part of a tutorial at http://maestric.com/doc/java/spring/setup
I was working through a tutorial at http://fszlin.blogspot.com/2010/05/comsuming-wcf-services-with-android.html and am having a problem. The
I'm trying to work through this tutorial to learn ember - http://www.tuanleaded.com/blog/2012/04/getting-started-with-ember-js-the-missing-to-dos-manual/ I have
I am running through the Rails Tutorial by Michael Hartl (Screen Cast). Ran into

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.