Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Hi and welcome to SO. Your example is not really complete as you print(url) but we don't see where that variable url is defined. Commented Feb 12, 2022 at 15:22
  • 1
    Please include the input data. There is no way that script produces the output shown. We should see "test.php" in there either as a separate line or as the end of the last line. Commented Feb 12, 2022 at 16:00
  • 1
    Sometimes printing data helps. If you add print("DEBUG", repr(myURL), repr(myURL.replace("rep.php","")) you'll see the problem. Commented Feb 12, 2022 at 16:14