Posts Categorized: PHP

Please Notice that this is my personal code snippets which I put there to behold and to more quickly find the required code.
And if these snippets will help somebody in his work, I’ll be happy that I could help

Wamp – Project Links do not work Localhost WampSerwer

I use the Wamp Server on my computer, but whenever I try to access on of my projects from the localhost homepage, in the www file;

I get redirected to a Page not found error.

When I hover above the links the directory always comes up “http:// ProjectFolderNameHere /” when it’s supposed to be “http:// LocalHost:8080 / ProjectFolderNameHere /”.

For sort this problem open index.php in www folder and set:

$suppress_localhost = false;

This will prepend http://localhost/ to your project links

How to find in which Directory is file on server

Some wired server have really strange patch to file how to find if you need write exactly path to some file without using short way with you domain

Create directory.php file upload on server in directory which you are looking to and run this file for example:

$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/file.html" . "</p>";