Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Boise, Idaho
    Posts
    84
    Vote Rating
    13
    PhilMerrell will become famous soon enough

      0  

    Default Loading Json Stores from files with PHP extension

    Loading Json Stores from files with PHP extension


    I can't quite figure out why data won't load into my store from a php file formatted in JSON.

    I've verified the output of my PHP is valid JSON via JSONLint.com, but when I try to load the store I get, "Unable to load data using the supplied configuration.
    Open in Browser:"

    If I copy and paste the output of my php file into a file with the .json extension, everything loads fine.

    Is .php not a valid extension for loading a store? I feel like I've seen examples where people have done it.

    Thanks,

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Any extension should work as long as the server can send correct format and content type.

    Is your proxy url set? After this message, you see the proxy url which you can click to check if the url is setup correctly.
    >Open in Browser:"

    Also is you Url Prefix setup correctly in Project Settings?
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Boise, Idaho
    Posts
    84
    Vote Rating
    13
    PhilMerrell will become famous soon enough

      0  

    Default


    Thanks for taking a look at the thread....

    For now I'm running on my localhost (mac os 10.7.3).

    I have my ajax proxy pointing to the file ala: http://localhost/~hal1000/MyProject/jsonFeed.php, which is the main project directory.

    I have set up the URL prefix in project settings and tried to provide both a relative and then an absolute path to the json.php with no luck.

    In the PHP file I have also tried to set the header content type as "application/json", but there has been no change.

    When I navigate to the json.php file in my browser, it loads fine. It is not formatted with line breaks, but as I indicated before, it is valid JSON according to jsonlint.com.

    Just to reiterate, when I copy and paste the json.php file's contents out of browser, and into a new file named jsonFeed.json, it loads just fine.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    South of France
    Posts
    6
    Vote Rating
    0
    ultradiv is on a distinguished road

      0  

    Default


    when you look at the source code of the browser view of your jsonFeed.php file is it exactly as needed or are there any other text bits like headers or html. You should only have pure text in the shape of the text you paste into the static file that works.

    Also start with the php file in the same directory that your static file that works resides and call it the same name with he same path but simply change the extension.

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Boise, Idaho
    Posts
    84
    Vote Rating
    13
    PhilMerrell will become famous soon enough

      0  

    Default


    I was able to figure it out... thanks for helping troubleshoot. Viewing the source of the .php json led me in the right direction. There wasn't any html tags, but I did notice that there were some invisible line breaks in the php version that didn't appear in the static .json version.

    I stripped out the line breaks in my PHP file ala:
    PHP Code:
    str_replace("\n"" "$description); 
    and it's now loading like a charm.

    Thanks for the help. Hope this helps out someone else....

    -Phil

Thread Participants: 2