SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: ftp ?

  1. #1
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ftp ?

    Hello Friends,

    I am trying to open up a ftp stream as follow

    $fp=fopen("ftp://usernameassword@IP/downloads/orders.xml","r");
    var_dump($fp);

    but it failed to open stream ??

    one thing is my password carries "/" this character will this impact?

    Can anyone help me why it is failing?

    Regards,

  2. #2
    SitePoint Addict ArunB's Avatar
    Join Date
    Jun 2008
    Location
    Hyderabad
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you try http://in3.php.net/ftp?

    Or try the configuration:
    Code:
    ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
    allow_url_include = Off
    Change allow_url_include to On in your php.ini file.

  3. #3
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    allow_url_include is already set and I wanted to try this via streams only.

  4. #4
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by priti View Post
    Hello Friends,

    I am trying to open up a ftp stream as follow

    $fp=fopen("ftp://usernameassword@IP/downloads/orders.xml","r");
    var_dump($fp);

    but it failed to open stream ??

    one thing is my password carries "/" this character will this impact?

    Can anyone help me why it is failing?

    Regards,
    post the error that you got so that we can get idea to help you.,

  5. #5
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fopen(ftp://...@[IP]/downloads/orders.xml) [function.fopen]: failed to open stream: No error in C:\xampp\htdocs\priti\testftp.php on line 5


Bookmarks

Posting Permissions

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