Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong $httpRootDir #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

GaneshKandu
Copy link

str_replace — Replace all occurrences of the search string with the replacement string

My http root directory is /home/usr/public_html/
public folder is /home/usr/public_html/public

str_replace replacing /public from and making it like /home/usr_html which is wrong.

$httpRootDir = substr($publicDir,0,-strlen($basePath));

This solution is working for me

> str_replace — Replace all occurrences of the search string with the replacement string

My http root directory is ```/home/usr/public_html/```
public folder is ```/home/usr/public_html/public```

str_replace replacing ```/public``` from and making it like ```/home/usr_html``` which is wrong.

```php
$httpRootDir = substr($publicDir,0,-strlen($basePath));
```

This solution is working for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant