<li id="00io6"><option id="00io6"></option></li>

  • News<\/h1>




    include('locationfilename.php');

    function createur1($text){
    \/ \/Insert your link into the news text file like this
    \/\/${http:\/\/mysite.ch}
    \/\/Or ${http:\/\/mysite.ch|My homepage in}
    \/\/Start processing the text file part
    $s=$text;
    $a=strstr($s,'${');
    if ($a){
    $b=strstr( $a,'}');
    if ($b){
    $la=strlen($a); $ls=strlen($s);
    $s=substr($s,0 ,$ls-$la);
    $a=substr($a,2);
    $lb=strlen($b); $la=strlen($a);
    $a=substr ($a,0,$la-$lb); $b=substr($b,1);
    $ta=strstr($a,\"|\");
    if($ta){
    $la=strlen($a); $lt=strlen($ta);
    $linktext=substr($a,$la-$lt+1);
    $a=substr($a ,0,$la-$lt);
    ??????????????????????????????????????????????????????????$a.\"\">\".$linktext.\"<\/a>\".$b;
    }
    }

    return($s);
    }

    \/\/Modify your news file storage directory here
    \/\/Remember, news files must be text files
    $newspath=\"\/home\/htdocs\/test\/new\/\";

    \/\/Set the array
    $newsfile=array();

    \/\/Set the directory handle
    $hd=dir($newspath);

    \/\/Get all files, And store it in the array
    while($filename=$hd->read() ){
    $s=strtolower($filename);
    if (strstr($s,\".txt \")){
    \/\/Detect the latest modification date
    $lastchanged=filemtime($newspath.$filename);
    $newsfile[$filename]=$lastchanged;
    }
    }

    \/\/File sorting
    arsort($newsfile);
    \/\/Output file
    for(reset($newsfile); $key=key($newsfile); next($newsfile) ){
    $fa=file($newspath.$key);
    $n=count($fa);
    print \"
  • n\";
    print \" \".date(\"d.m.Y - H:i:s\",$newsfile[$key]).\"<\/b>
    n\";
    for($i=0; $ i<$n; $i=$i+1){
    $s=chop($fa[$i]);
    $s=htmlspecialchars($s);
    $s=createur1( $s);
    print $s.\"
    n\";
    }
    print \"<\/td><\/tr>\";
    }
    $hd- >close();

    ?>
    <\/body>
    <\/html>\n
    <\/p>\n

    <\/p>\n

    \nhttp:\/\/www.bkjia.com\/PHPjc\/316336.html<\/span>www.bkjia.com<\/span>true<\/span>http: \/\/www.bkjia.com\/PHPjc\/316336.html<\/span>TechArticle<\/span>A program for dynamically publishing news in real time, which can automatically arrange the display order according to the release time. News files are text files stored in the specified directory. When there is news, the program...<\/span>\n<\/div>\n
    <\/div>"}

    国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

    Home Backend Development PHP Tutorial A program to publish dynamic news in real time using text files_PHP tutorial

    A program to publish dynamic news in real time using text files_PHP tutorial

    Jul 21, 2016 pm 04:03 PM
    dynamic release Can land real time accomplish document text news time use of program automatic

    A program for dynamically publishing news in real time, which can automatically arrange the display sequence according to the release time. News files are text files stored in the specified directory. When there is news, the program will automatically display it and arrange it at the beginning of the page.


    News


    News






    include('locationfilename.php');

    function createur1($text){
    / /Insert your link into the news text file like this
    //${http://mysite.ch}
    //Or ${http://mysite.ch|My homepage in}
    //Start processing the text file part
    $s=$text;
    $a=strstr($s,'${');
    if ($a){
    $b=strstr( $a,'}');
    if ($b){
    $la=strlen($a); $ls=strlen($s);
    $s=substr($s,0 ,$ls-$la);
    $a=substr($a,2);
    $lb=strlen($b); $la=strlen($a);
    $a=substr ($a,0,$la-$lb); $b=substr($b,1);
    $ta=strstr($a,"|");
    if($ta){
    $la=strlen($a); $lt=strlen($ta);
    $linktext=substr($a,$la-$lt+1);
    $a=substr($a ,0,$la-$lt);
    ??????????????????????????????????????????????????????????$a."">".$linktext."".$b;
    }
    }

    return($s);
    }

    //Modify your news file storage directory here
    //Remember, news files must be text files
    $newspath="/home/htdocs/test/new/";

    //Set the array
    $newsfile=array();

    //Set the directory handle
    $hd=dir($newspath);

    //Get all files, And store it in the array
    while($filename=$hd->read() ){
    $s=strtolower($filename);
    if (strstr($s,".txt ")){
    //Detect the latest modification date
    $lastchanged=filemtime($newspath.$filename);
    $newsfile[$filename]=$lastchanged;
    }
    }

    //File sorting
    arsort($newsfile);
    //Output file
    for(reset($newsfile); $key=key($newsfile); next($newsfile) ){
    $fa=file($newspath.$key);
    $n=count($fa);
    print "";
    }
    $hd- >close();

    ?>


    www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316336.htmlTechArticleA program for dynamically publishing news in real time, which can automatically arrange the display order according to the release time. News files are text files stored in the specified directory. When there is news, the program...
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    How to make Google Maps the default map in iPhone How to make Google Maps the default map in iPhone Apr 17, 2024 pm 07:34 PM

    The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

    Why can't Xiaohongshu publish videos of works? How does it publish its work? Why can't Xiaohongshu publish videos of works? How does it publish its work? Mar 21, 2024 pm 06:36 PM

    With the rapid development of social media, short video platforms have become the main channel for many users to express themselves and share their lives. Many users may encounter various problems when publishing videos of their works on Xiaohongshu. This article will discuss the reasons that may cause the video publishing of Xiaohongshu works to fail and provide the correct publishing method. 1. Why can’t Xiaohongshu publish videos of works? The Xiaohongshu platform may occasionally experience system failures, which may be caused by system maintenance or upgrades. In this case, users may encounter the problem of being unable to publish videos of their works. Users need to wait patiently for the platform to return to normal before trying to publish. An unstable or slow network connection may prevent users from posting videos of their work on Xiaohongshu. Users should confirm their network environment to ensure that the connection is stable and

    Why can't Xiaohongshu be released? What should I do if the content published by Xiaohongshu cannot be displayed? Why can't Xiaohongshu be released? What should I do if the content published by Xiaohongshu cannot be displayed? Mar 21, 2024 pm 07:47 PM

    As a lifestyle sharing platform, Xiaohongshu has attracted a large number of users to share their daily life and grow products. Many users have reported that their published content cannot be displayed. What is going on? This article will analyze the possible reasons why Xiaohongshu cannot be released and provide solutions. 1. Why can’t Xiaohongshu be released? Xiaohongshu implements strict community guidelines and has zero tolerance for publishing advertisements, spam, vulgar content, etc. If the user's content violates the regulations, the system will block it and the content will not be displayed. Xiaohongshu requires users to publish high-quality and valuable content, and the content needs to be unique and innovative. If the content is too generic and lacks innovation, it may not pass review and therefore not be displayed on the platform. 3. Account abnormality

    How to delete Xiaohongshu releases? How to recover after deletion? How to delete Xiaohongshu releases? How to recover after deletion? Mar 21, 2024 pm 05:10 PM

    As a popular social e-commerce platform, Xiaohongshu has attracted a large number of users to share their daily life and shopping experiences. Sometimes we may inadvertently publish some inappropriate content, which needs to be deleted in time to better maintain our personal image or comply with platform regulations. 1. How to delete Xiaohongshu releases? 1. Log in to your Xiaohongshu account and enter your personal homepage. 2. At the bottom of the personal homepage, find the &quot;My Creations&quot; option and click to enter. 3. On the &quot;My Creations&quot; page, you can see all published content, including notes, videos, etc. 4. Find the content that needs to be deleted and click the &quot;...&quot; button on the right. 5. In the pop-up menu, select the &quot;Delete&quot; option. 6. After confirming the deletion, the content will disappear from your personal homepage and public page.

    Clock app missing in iPhone: How to fix it Clock app missing in iPhone: How to fix it May 03, 2024 pm 09:19 PM

    Is the clock app missing from your phone? The date and time will still appear on your iPhone's status bar. However, without the Clock app, you won’t be able to use world clock, stopwatch, alarm clock, and many other features. Therefore, fixing missing clock app should be at the top of your to-do list. These solutions can help you resolve this issue. Fix 1 – Place the Clock App If you mistakenly removed the Clock app from your home screen, you can put the Clock app back in its place. Step 1 – Unlock your iPhone and start swiping to the left until you reach the App Library page. Step 2 – Next, search for “clock” in the search box. Step 3 – When you see “Clock” below in the search results, press and hold it and

    Convert VirtualBox fixed disk to dynamic disk and vice versa Convert VirtualBox fixed disk to dynamic disk and vice versa Mar 25, 2024 am 09:36 AM

    When creating a virtual machine, you will be asked to select a disk type, you can select fixed disk or dynamic disk. What if you choose fixed disks and later realize you need dynamic disks, or vice versa? Good! You can convert one to the other. In this post, we will see how to convert VirtualBox fixed disk to dynamic disk and vice versa. A dynamic disk is a virtual hard disk that initially has a small size and grows in size as you store data in the virtual machine. Dynamic disks are very efficient at saving storage space because they only take up as much host storage space as needed. However, as disk capacity expands, your computer's performance may be slightly affected. Fixed disks and dynamic disks are commonly used in virtual machines

    What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. Mar 21, 2024 pm 09:17 PM

    When deleting or decompressing a folder on your computer, sometimes a prompt dialog box &quot;Error 0x80004005: Unspecified Error&quot; will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

    How to publish Xiaohongshu video works? What should I pay attention to when posting videos? How to publish Xiaohongshu video works? What should I pay attention to when posting videos? Mar 23, 2024 pm 08:50 PM

    With the rise of short video platforms, Xiaohongshu has become a platform for many people to share their lives, express themselves, and gain traffic. On this platform, publishing video works is a very popular way of interaction. So, how to publish Xiaohongshu video works? 1. How to publish Xiaohongshu video works? First, make sure you have a video content ready to share. You can use your mobile phone or other camera equipment to shoot, but you need to pay attention to the image quality and sound clarity. 2. Edit the video: In order to make the work more attractive, you can edit the video. You can use professional video editing software, such as Douyin, Kuaishou, etc., to add filters, music, subtitles and other elements. 3. Choose a cover: The cover is the key to attracting users to click. Choose a clear and interesting picture as the cover to attract users to click on it.

    See all articles
    <ul id="0wuak"></ul>
  • <fieldset id="0wuak"><source id="0wuak"></source></fieldset>
    n";
    print " ".date("d.m.Y - H:i:s",$newsfile[$key])."
    n";
    for($i=0; $ i<$n; $i=$i+1){
    $s=chop($fa[$i]);
    $s=htmlspecialchars($s);
    $s=createur1( $s);
    print $s."
    n";
    }
    print "
    <li id="0wuak"></li>