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

  • Home
  • SEARCH
  • 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 9270267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:19:35+00:00 2026-06-18T15:19:35+00:00

I see how WAMP does this, and I want to implement this technique to

  • 0

I see how WAMP does this, and I want to implement this technique to my website to get the image encryption from the database, basically what I’m doing so far; but whenever I echo out the base64 decode with the ‘EOFILE’ in the variable, the image results in errors.

BUT, whenever I only have the base64 decode echo without the ‘EOFILE’s added in the variable, the image shows.

My question is, is there a way to add a variable in the <<< EOFILE . $x . EOFILE;

OR it’s completely OK to not include the ‘EOFILE’s in the PHP code.

Here are some references:

WAMP, using the ‘EOFILE’ when assigning the encryption to the variable:

$pngPlugin = <<< EOFILE
//base64 encryption of the image
EOFILE;

What I’m trying, with no EOFILE:

//note that the file when uploaded will get base64_encode() to the DB
$test = file_get_contents('./image.png');
$test2 = base64_encode($test);
//then implemented this way on the page via the DB
header("Content-type: image/png");
echo base64_decode($test2);

Adding variables to the <<< EOFILE doesn’t really work for some reason, but is it really needed? I never used EOFILE in PHP before, and google didn’t really do anything good for me, but how important is it? Do I need to worry about it if I don’t have it included in my code?

Also, what is the ‘<<<‘ used for in PHP?

Thank you 🙂

  • 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-18T15:19:36+00:00Added an answer on June 18, 2026 at 3:19 pm

    The EOFILE is an arbitrary identifier in the Heredoc syntax which is used to define string literals.

    You can choose any identifier, e.g.:

    $i = <<< EOM
    The message goes here.
    EOM;
    

    However, if you already have a variable containing base64 encoded data (such as from a database) you can simply do this:

    echo base64_decode($str);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See the picture below. It's a flash game from a well known website :)
I am trying to understand part of the output I get from this code:
Does anybody know how I can get this xml into the domDocument? Right now,
I am running WAMP server. On file upload using PHP I see $_FILES[tmp_name] =>
see fiddle I want to drag the mouse on cell and whatever is under
See this question. How to show popup message like in stackoverflow I am trying
UPDATE -- working on getting WAMP with phpDeveloper/Xdebug going. I still want NetBeans --
I am trying to install xdebug on wamp server. With this code: zend_extension_ts=c:/wamp/bin/php/php5.3.0/ext/php_xdebug-2.1.0RC1-5.3-vc9.dll xdebug.default_enable
why i see this error message ( ! ) Notice: Undefined index: poll in
i use wamp server 2.2 , and i want using web service in my

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.