开发者

Spoon-library acts different on localhost then on webhosting

I have a problem regarding the spoon-library (www.spoon-library.com). I have a folder with subfolders, each subfolder is a 'reference' from my dad his company. (although its translated to my native language). Each of the 'reference' subfolder contains images.

I am reading the names of al subfolders and the images that are in that specific folder and save it to an array. With the use of spoon-library i am nesting these in template variable in my tpl files. So basically I print the <h2></h2> with the project's title (the subfolder name), and all his images (so that they can be viewed through lightbox).

On my localhost and my website (provider A) it works, but when i upload it to my dad his hosting (provider B) it doens't work.

ex.

http://davyloose.be/electroloose/projecten.php -> it works.

http://electro-loose.be/projecten.php -> it doens't work.

The code is identical.

Example of the array with the data that i get through the folders (note, i get the same data on both webspace):

Array ( 
[0] => Array ( 
    [title] => Apotheek Beerlandt 
    [images] => Array ( 
        [0] => Array ( [url] => beerlandt 2.JPG ) 
        [1] => Array ( [url] => beerlandt 3.JPG ) 
        [2] => Array ( [url] => beerlandt 1.JPG ) 
    ) 
)
)

This is entered in the following 'html' code (template file):

              {iteration:referenties}

                 <h2>{$referenties.title}</h2>
                 <div id="imageslide">
                    {iteration:referenties.images}
                        <a href="/images/referenties/{$referenties.title}/{$referenties.images.url}" rel="lightbox[{$referenties.title}]"><img src="/images/referenties/{$referenties.title}/thumbs/{$referenties.images.url}" /></a>
                    {/iteration:referenties.images}
                 </div>
           {/iteration:referenties}

Note: references in my native language is 'referenties'.

开发者_如何学Python

It seems that on my dad his webhosting a '.' changed to '->', although i'm not really sure (as in 'I can't believe that).

The php version on my localhost and my webhosting are PHP5.3.5, the version on my dad his hosting is 5.1.2.

I hope you guys can help me out on this one :).

PS: I know i can fix this with the use of an sql database. And i'm going to do that in the near future, but for now i just want to know why this error is occurring.

Thanks in advance!

Edit: I just enabled the display_errors in my php.ini and now i see the following error 'Notice: Undefined variable: count in /var/www/html/test/spoon/template/compiler.php on line 913' (and also on some other lines). Still, it's a mystery why it works on my localhost and not on my dad his host.


I'm the author of Spoon Library. I believe the issue lies with the differences in the PHP versions. The $count parameter that the notices are talking about were added in PHP5.1, but for some reason they don't seem to work exactly as expected in the PHP version on your dad's host.

I'd recommend to try and get the hosting to use at least PHP5.2, because there are another few issues that might occur within other spoon packages because of this.

If you need any more help you can always find me on twitter(@spoonlibrary) or e-mail me (davy@spoon-library.com)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜