Jump to content

Search the Community

Showing results for tags 'php terminate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I kind of posted this code earlier but earlier I had other question anyways I ran into another situation and got stuck again..... ok I made this drop list and I only make it to show all .txt files in the current folder and made it to have error if there's NO .txt files in the folder but I want the error to show with ONLY the error message but somehow what I'm doing now shows the drop list with nothing in the drop list and the error message. How can I make it so it only shows the error message only and shows nothing else? This is my coding: <?php if(!(is_dir("./aaa"))) { die("Must create a <strong>aaa</strong> folder first, sorry"); } echo "<form action=\"./page2.php\" method=\"get\">"; echo "<select name=\"aaa\">"; $aaa_files = scandir("./aaa"); $hastxt = false; foreach($aaa_files as $file_list) { $file_list = strtolower($file_list); if(($file_list == ".") || ($file_list == "..")) { continue; } if(strlen($file_list)>4 && strtolower(substr($file_list, -4))!='.txt') { continue; } else { $hastxt = true; echo "<option value=\""; echo basename($file_list,".txt"); echo "\">"; echo basename($file_list,".txt"); echo "</option>"; } } echo "</select>"; echo "<br/><input type=\"submit\">"; echo "</form>"; if($hastxt == false) { echo "Must create text files first, sorry"; die(); } ?> ----------------------------------------------------------------- This is what shows if I don't have any txt file in the folder but what I want it to so is something like the image below ----------------------------------------------------------------- This is how I want the error message to show...but of course without the arrow...just plain error message nothing else....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.