php does not work _Russia

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

php does not work _Russia

Postby sergey42663 » 22. April 2011 02:04

Hello, I'm from Russia and would like to apologize in advance for the English)
I have a problem - will not work php scripts.

See I drive
address - file: / / / F: / xampp / htdocs / index.php
and appears

<? php
if (! empty ($ _SERVER ['HTTPS']) & & ('on' == $ _SERVER ['HTTPS'])) {
$ uri = 'https ://';
} Else {
$ uri = 'http://';
}
$ uri .= $ _SERVER ['HTTP_HOST'];
header ('Location:'. $ uri. '/ xampp /');
exit;
?>
Something is wrong with the XAMPP installation :-(


More
address - file: / / / F: / xampp/htdocs/xampp/123.php

<? php
echo "hello wotld";
?>

and on-screen Web brovser appears the same, with all php scripts.
Please tell me how to get to work php.
sergey42663
 
Posts: 2
Joined: 22. April 2011 01:49

Re: php does not work _Russia

Postby Altrea » 22. April 2011 04:16

sergey42663 wrote:address - file: / / / F: / xampp / htdocs / index.php

php will not be parsed with the file:// protocol, because that protocol works in file context not in request context.
Try http://localhost/index.php

sergey42663 wrote:address - file: / / / F: / xampp/htdocs/xampp/123.php

Don't save your own files inside the htdocs\xampp folder!
That folder is just for the xampp internal scripts.
Create your own folder in htdocs and save your files there

Example:
File = F:\xampp\htdocs\projextxy\file.php
Request url = http://localhost/projectxy/file.php

btw: This is the german section of this board!
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8293
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: php does not work _Russia

Postby sergey42663 » 23. April 2011 02:54

Thank you very much!
Now everything works.

ЕЩЕ РАЗ БОЛЬШОЕ СПАСИБО!!! :)
sergey42663
 
Posts: 2
Joined: 22. April 2011 01:49


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 12 guests