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 3335414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:00:56+00:00 2026-05-18T00:00:56+00:00

How can I write this PHP code in JavaScript? I have no knowledge about

  • 0

How can I write this PHP code in JavaScript?

I have no knowledge about JavaScript… :-s

<?php
    $pozethumb=scandir("./pics/flori/thumbs");
    $size=count($pozethumb);
    $nrpoze=$size-2;                    
    for($i=2;$i<$size;$i++)
    {
        echo"<img src=\"./pics/flori/thumbs/$pozethumb[$i]\" class=\"thumb\" sou=\"$pozethumb[$i]\" />";
    }                    
?>
  • 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-05-18T00:00:57+00:00Added an answer on May 18, 2026 at 12:00 am

    Consider familiarizing yourself with nodejs. It requires you to have a serverside V8 JS engine installed on the server. This would allow you to use ECMAScript/JavaScript on the server, e.g. list files on the filesystem of the server and query it from the client.

    See the API docs

    • fs.readdir(path, [callback])
      Asynchronous readdir(3). Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding ‘.’ and ‘..’.

    and

    • fs.readdirSync(path)
      Synchronous readdir(3). Returns an array of filenames excluding ‘.’ and ‘..’.

    You might also be interested in phpjs, which aims to port PHP functions to PHP (doesnt have scandir though and I’m really not sure what to think of that in general anyway).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I'm using a Hashtable , I can write code like this: object item
Eg. can I write something like this code: public void InactiveCustomers(IEnumerable<Guid> customerIDs) { //...
In Oracle, you can write: update t set xml = updateXML(xml, '/a/b/text()', 'gaga') This
According to this site I can simply write $user = getlogin(); but the group
Can I write to the end of a 5GB file in Java? This question
I'd like to write a MessageConverter class that can wrap another MessageConverter. This MessageConverter
Hi guys looking for some guidance, i have a knowledge of xhtml, css, javascript,
I'm looking for a javascript version of PHP's html_entity_decode . I found this: function
I have read some posts about this topic and the answers are comet, reverse
In my document I have this script: $.ajax({ type:POST,url:ajax.php,data:data, success: function() { //onsuccess },

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.