简体   繁体   中英

How can i print information from one main file txt or php to all content on a website

Thanks for taking the time to look at this.

Okay I am looking for a way that I can use one file to edit all content on my website.

So if I am using a file in my header saying:

<?php include("content.php");?> 
<?php include("content.txt");?>

in content.php or conntent.txt you have:

<?php
$SayHello = "Hello, How are you I am john";
$SayNo = "No, Try this";

?>

in index.php you have something like this

<div class="row-fluid">
            <div class="span12">
                <div class="span6">
                    <h4 class="total-solution-head"> print $SayHello </h4>
                    <p class="total-solution-para">print $SayNo</p>

I know i am doing my code wrong i would like to know the right way to do this thank you

如果要运行PHP代码,则需要告诉PHP您正在编写PHP代码:

<?php print $SayHello ?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM