Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    172
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with this

    PHP Code:
    $url "http://blahblahblah.com";

    $lines file('$url'); 
    It is literally trying to access http://$url and gives this error:

    Warning: file($url): failed to open stream: No such file or directory in /home/domains/blah.com/user/htdocs/blah/blah.php on line 8
    How do I fix this?
    \o/

  • #2
    New Coder
    Join Date
    Apr 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    u have to use double quotes
    file("$url");

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    ... preferably no quotes ...
    PHP Code:
    <?file$url ) ;?>
    + please try and give a better thread title , I know its a hard one to pin a title to but I thought the question was about objects !
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •