php - Directory path calls, strange behaviour -


I have an Ajax request that I is I am trying to call that particular file which:

  root / admin / functions / upload / filename.php   

has requested page is located at:

  root / admin / customer / 123   

Actisi has been modified through the

  root / admin / customer.php? Id = 123   

I've tried every combination of paths that I can think of, but for example, I get some strange behavior when I

  ../functions/upload/filename.php   

this file

  root / functions / uploads / filename.php   

and when I use

  functions / upload / filename.php   

in this file

  looks root / admin / client / functions / upload /filename.php   

so I tried

 . ./admin / functions / upload / filename.php   

> and it looks

  Rs   

I'm pulling my hair here, did anyone know what this could be?

-Side does not know anything about the path, and it only appears in the address bar, like

  http://example.com/ROOT/admin/customers/123 < / Code>  

Then if your ajax code looks

  $ Ajax ('functions / foo / bar.php');   By adding  ../ , the level of address of source page can be removed:  
  $. Ajax ('../../functions/foo/bar.php');   

In the results

  http://example.com/ROOT/admin/customers/123/../../functions/foo/bar .php ^ -E- ^ ^ ------- B ------ ^ http://example.com/ROOT/admin/functions/foo.bar.php   

You probably want

  $ Ajax ('/ root / functions / foo / bar.php');   

With that leading / , the browser ignores all the subdirectories in the URL and uses the entire path from the AJAX call as the entire path.

  http://example.com/+ ROOT / functions / foo.bar.php    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -