6 line php 2 asp

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Guys, this is your humble ASP colleague asking for help.
I have no experience with PHP and I need this 6 line page translated
to ASP

$location   = 'albums';
$album_name = $_GET['album_name'];
$files      = glob($location . '/' . $album_name . '/*.',
$encoded    = json_encode($files);
echo $encoded;

it comes from here:
http://tympanus.net/codrops/2010/06/27/beautiful-photo-stack-gallery-with-jquery-and-css3 /
but I honestly would not know where to start

No cross-subject violation meant, just shopping where the knowledge
Sorry, and thanx again


Re: 6 line php 2 asp

On 2/8/2012 4:40 PM, Pettt[CZ] wrote:
Quoted text here. Click to load it
http://tympanus.net/codrops/2010/06/27/beautiful-photo-stack-gallery-with-jquery-and-css3 /
Quoted text here. Click to load it

You'll do better asking in an asp newsgroup, since that's your target.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: 6 line php 2 asp

On Wed, 08 Feb 2012 13:40:42 -0800, Pettt[CZ] wrote:

Quoted text here. Click to load it
Quoted text here. Click to load it

See Jerry's comments - I can try and explain what I think the code does,
but (a) I might be wrong and (b) I know nada about ASP.

It seems to be generating a json encoded list of pathnames of all files
matching 3 popular image types in a subdirectory of "albums" that was
passed as a parameter in a get request.

The following pages should help you work your way through understanding
the php:

1) $_GET[] http://uk.php.net/manual/en/reserved.variables.get.php
2) glob() http://uk.php.net/manual/en/function.glob.php
3) string concatenation http://uk.php.net/manual/en /
4) json_encode() http://uk.php.net/manual/en/function.json-encode.php
5) echo http://uk.php.net/manual/en/function.echo.php
6) unset http://uk.php.net/manual/en/function.unset.php

Basically, the file expects a get request that looks something like:


then given files in: "albums/dirname" with the names:


I believe that the response will look something like:


But that's the best I can offer you.

This might give you enough of an understanding to write the equivalent
ASP code, or it might not.


Denis McMahon

Re: 6 line php 2 asp

El 08/02/2012 22:40, Pettt[CZ] escribió/wrote:
Quoted text here. Click to load it

If I recall correctly, ASP was already abandoned when JSON was invented
so you'll have to write your own JSON routines.

-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com

Re: 6 line php 2 asp

On Feb 9, 5:11=A0pm, "=C1lvaro G. Vicario"
Quoted text here. Click to load it

There are a couple of libraries listed on http://www.json.org/ for it.
I can't recall which one of them I used when I last did an asp project
but whichever one it was, worked well (and is still working).

Site Timeline