Jump to content

[SOLVED] Does $HTTP_SERVER_VARS['PHP_SELF'] transfer control back to the PHP file?


Recommended Posts

Hi,

 

I found some code about a PHP slideshow that works on an html template. In an attempt to make sense of the code.....

 

There's an image with the $nav string assigned to it. ($template holds the html code)

The $path string inside $nav is what I need clarification about.

$nav = "<a href='$path?directory=$path_to_images&currentPic=$nav'>$back_src</a>";
$template = str_replace("<BACK>",$nav,$template);

 

This is how the $path string is assigned.

$path = empty($HTTP_SERVER_VARS['PATH_INFO'])?$HTTP_SERVER_VARS['PHP_SELF']:$HTTP_SERVER_VARS['PATH_INFO'];

I need to know if when that back button is clicked, will the php file call itself and pass all the parameters of $nav to itself?

OR may I know what does the above code do?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.