PHPでサービスを開発してて.env
に
URL="http://localhost/users"
としててdotenv
で
PHP
1$url = getenv["URL"]; 2echo $url // https://localhost/users 3$url = "https://localhost" 4echo $url // https://localhost/users
このようになってしまい、\
が入ってしまい、後続の処理でhttprequestが送れなくて困っています。
どのようにすれば\
を取り除くことができるでしょうか?
str_replace
は\
を入れた途端、エラーになります。
よろしくお願い致します。