SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2009
    Location
    SEPA
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fopen() Fails to work on Remote Server

    I have a script that works on my local server but fails on the remote. The remote is https, however I have not been able to find any docs to give direction. I have changed the a+ to w or a, file.

    Anyone be able to point me in the right direction?

    Thank you

    Gary

    PHP Code:

    $cf 
    $_POST['cf'];
    $myfile 'myfile.txt';
    $gbs fopen($myfile'a+');
    fwrite($gbs$cf);
    echo 
    'This is contents of readfile:'//for debugging
    echo '<br />';
    readfile($myfile);

    if (
    file_exists($myfile)) {
        echo 
    "The file $myfile exists";
    } else {
        echo 
    "The file $myfile does not exist";


  2. #2
    SitePoint Zealot
    Join Date
    Apr 2009
    Location
    SEPA
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Issue solved, it was a permission set on the server...

    Gary


Tags for this Thread

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
  •