Insert TEXT in HTML

I need to insert a file (disclaimer) in many website , used to use a java, but want to change it to PHP /Javacript ,

Have this :
# cat dis.php
<div><p><?php include(''); ?></p></div>

but doesn't work, I get this error :
# php dis.php
<div><p>PHP Warning:  include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/ on line 1
PHP Warning:  include( failed to open stream: no suitable wrapper could be found in /var/www/vhosts/ on line 1
PHP Warning:  include(): Failed opening '' for inclusion (include_path='.:') in /var/www/vhosts/ on line 1

please help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Don't use the 'http' because that makes it 'logically' a remote access.  Just use the file name with the path from the web root.

<div><p><?php include('/test/disclaimer.htm'); ?></p></div>

That should Not be a complete web page, only the disclaimer text.  If it is a complete web page, it will break the formatting of the page you are including it in.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
You could enable the include() wrappers, and that would seem the easiest to me.  Or you could add this in place of the include wrapper.  The unwanted HTML tags have been removed.  It may suffer from character code collisions (not sure about that).

function disclaimer()
    $htm = <<<EOD
<p>This World Wide Web site with its home page in the domain ' 
and' and other websites that are designed by Solution21 Inc 
(also known as Dentistry21), Solution21 Inc. clients, hereinafter referred to as 
the website, is an information service provided by Solution21, Inc. and its 
clients hereinafter referred to as Solution21, at no charge to users of the 
World Wide Web, with the express condition that these users agree to be bound by 
the terms and conditions set forth in this Terms of Use Agreement. Solution21 
reserves the right to change these terms and conditions at any time, and you 
agree to abide by the most recent version of this Terms of Use Agreement each 
time you view and use the website. You are accordingly advised to consult the 
Terms of Use Agreement each time you view and use the website.<strong> Whether 
you are a client of Solution21 Inc. or a visitor to its websites, DO NOT use the 
website if you do not agree with all of the following terms and conditions.</strong></p>
<p>1. You acknowledge that the information on this website is provided 'as is' 
for general information only. It is not intended to provide dental or medical 
advice, and should not be relied upon as a substitute for consultations with 
qualified health professionals who are familiar with your individual dental 
condition. No warranties of any kind is given regarding use of this website, 
including but not limited to any warranty of accuracy, completeness, currency, 
reliability, merchantability or fitness for a particular purpose, or any 
warranty that these pages, or the computer server which makes them available, 
are free of viruses or other harmful elements, and such warranties are expressly 
<p>2. You agree that you will hold harmless Solution21 Inc. and its shareholders, 
officers, directors, clients and employees from all claims arising out of or 
related to your access or use of, or your inability to access or use, this 
website or the information contained in this website or other web sites to which 
it is linked, including but not limited to claims that you have found something 
you have heard, viewed or downloaded from this website or any other website to 
which it is linked to be obscene, offensive, defamatory, or infringing upon your 
intellectual property rights. In no event will Solution21 or any of the 
information contributors to the website be liable to you or anyone else for any 
decision made or action taken by you in reliance on such information or for any 
consequential, special or similar damages, even if Solution21 has been advised 
of the possibility of such damages.</p>
<p>3. You acknowledge that the opinions and recommendations contained in this 
website are not necessarily those of Solution21 nor are they endorsed by 
Solution21. Many clients of Solution21 Inc. have access to create their own 
material on websites, the material created by clients remains the responsibility 
of the said client and Solution21 Inc does not accept liability and 
responsibility related to said materrial. </p>
<p>4. Solution21 may provide links on the website to other web sites which are 
not under the control of Solution21. In general, any website which has an 
address (or URL) not containing ' and' is such 
a website. Also Solution21 may frame other web sites inside its frame or and (or it's clients websites) frame. These 
links are provided for convenience or reference only and are not intended as an 
endorsement by Solution21 of the organization or individual operating the 
website or a warranty of any type regarding the website or the information on 
the website.</p>
<p>5. You may provide hypertext links to this website on another website, 
provided that: (a) the link be a text-only link clearly marked � 
and', (b) the link must 'point' to the URL ' and' and not to other pages within 
the website, (c) the appearance, position and other aspects of the link may not 
be such as to damage or dilute the goodwill associated with Solution21 and 
dentistry21 name and trademarks, (d) the appearance, position and other aspects 
of the link may not create the false appearance that an entity other than 
Dentistry21 or Solution21 is associated with or sponsored by Solution21, (e) the 
link, when activated by a user, must display this website full-screen and not 
within a 'frame' on the linked website, and (f) Solution21 reserves the right to 
revoke its consent to any link at any time at its sole discretion by amending 
this Terms of Use Agreement. You agree that any other hypertext links to this 
website must be approved in writing by Solution21.<br></p>
<p>6. The works of authorship 
contained in this website, including but not limited to all design, text and 
images, are owned or licensed by Solution21 and Dentistry21 or its licensors., 
hereinafter referred to as Solution21, or its suppliers and contributors, and 
may not be copied, reproduced, transmitted, displayed, performed, distributed, 
rented, sublicensed, altered, stored by subsequent use or otherwise used in 
whole or in part in any manner without Solution21 prior written consent, except 
that the user may make such temporary copies in a single computer's RAM and hard 
drive as is necessary to browse the website, and that the user may produce one 
permanent printout of each page of the website (unmodified in form, with a copy 
of this Terms of Use Agreement attached) to be used by the user for personal and 
non-commercial uses which do not harm the reputation of Solution21 or 
<p>7. This website (excluding linked sites) is hosted by Solution21, Inc. which 
is headquartered in the State of California, in the United States of America. It 
may be accessed from all 50 states, as well as from other countries around the 
world. Because each of these places has laws that may differ from those of 
California, by accessing this website you agree that the statutes and laws of 
the State of California, without regard to conflicts of law principles thereof, 
will apply to all matters arising from or relating to the use of this website. 
You also agree and hereby submit to the exclusive legal jurisdiction and venues 
of the Courts of Orange County, California and the United States District Court 
for the District of Orange county with respect to such matters. Solution21 and 
Dentistry21 make no representation that materials on the website are appropriate 
or available for use in other locations, and accessing them from territories 
where their contents are illegal is hereby prohibited. Individuals or 
organizations choosing to access this website from other locations do so of 
their own initiative and are responsible for compliance with local laws.</p>
<p>8. Solution21, Inc. It�s logo, nameplates, Practice-XL, and Dentistry21 are 
trademarks of Solution21, Inc. and are protected by international laws and 
treaty provisions.<br>All text and electronic images on this website are 
copyrighted materials which are either registered copyrights, unregistered 
common law copyrights, registered trademarks or sales marks of Dentistry21 or 
Solution21 Inc. its suppliers or contributors. Any attempt to infringe upon or 
to circumvent these copyrights or trademarks will subject to prosecution.<br>
Please direct any questions to:<br></p>
    echo $thm;


Open in new window

RobOwner (Aidellio)Commented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
Ray PaseurCommented:
Both answers here are correct.
Ray PaseurCommented:
3) Accept both Expert posts as the answer.  And deindex the question because it adds nothing of value to the PAQ.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.