Questions tagged [pathinfo]

85 questions
0
votes
1 answer

PATH_INFO in vbscript ASP IIS

I was wondering if somebody could guide me to configure my web server to do the following: http://mywebsite.com/default.asp/PATH Where Path would be retreive into a var. My problem is the following: When I call :…
Hipny
  • 739
  • 1
  • 11
  • 24
0
votes
1 answer

PHP Including a file based on pathinfo - security concern?

I am redirecting all page requests through a file called index.php which looks at the URL the visitor requested and sees if there is a template file to match. For example, http://www.website.com/contact will actually route to the index.php script…
MrCarrot
  • 2,546
  • 1
  • 23
  • 29
0
votes
3 answers

How to find the file name or extension from base name

I want to grab the file name from a known base name in PHP. I've searched and found pathinfo(), but then you already give the file name with base name and extension in the argument. Also in the pathinfo() docs: $path_parts =…
Maurice
  • 1,342
  • 11
  • 21
0
votes
3 answers

PATH_INFO in PHP without having file apparent

I have a simple script: index.php: When I run it like so www.website.com/index.php it works. ie) www.website.com/index.php/hello will echo /hello However,…
moesef
  • 4,641
  • 16
  • 51
  • 68
0
votes
1 answer

nginx path_info in alias environemnt

I need to get this working on nginx with php-fpm: example.com/studip/dispatch.php/admin/user/ The Problem seems to be, that /studip isn't a subfolder under root but a alias to /usr/local/studip/public/ Here's the configuration without the (non…
PascalTurbo
  • 2,189
  • 3
  • 24
  • 41
0
votes
3 answers

Getting the file name from a text file after string matching - PHP

I have a log file (log.txt) in the form: ========================================= March 01 2050 13:05:00 log v.2.6 General Option: [default] log_options.xml ========================================= Loaded options from xml file:…
-1
votes
1 answer

Rest API: What do first, distinguish REQUEST_METHOD or PATH_INFO?

I am working on a small REST API, written in PHP. Is there a best practice, to decide what the script should do? Do I first check if the request is GET, POST, PUT, DELETE or do I check first the PATH_INFO. Example first check PATH_INFO: $method =…
Trilex
  • 13
  • 5
-1
votes
1 answer

Deprecation of PATH_INFO .htaccess rule broken

Recently my hosting provider has been updating their apache systems to 2.4.4. In Doing so it has caused my expression engine site to break because i now need to force query strings to get the site running. From what i understand your can easily fix…
Luke O'Regan
  • 777
  • 1
  • 5
  • 11
-2
votes
2 answers

PHP unlink file with no extension

I am trying to unlink files in a Directory which have no extensions. I did following, but did not work: $fileInfo = pathinfo($this->outputPath); if($fileInfo['extension'] == NULL) { …
Olipol
  • 315
  • 1
  • 9
  • 19
-4
votes
1 answer

php pathinfo() expects parameter 1 to be string, array given in

I have a script that has the error-- pathinfo() expects parameter 1 to be string, array given in C:\xampp\htdocs\sitename\index.php on line 4--, how to fix a script is
user2988099
  • 1
  • 1
  • 7
1 2 3 4 5
6