php noob needs some help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Kaervek
Forum Commoner
Posts: 25
Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:

php noob needs some help

Post by Kaervek »

i posted a while ago for some advice on php, i havent tried anything with it since but right now i am looking into setting up this program called phpThumb.

http://phpthumb.sourceforge.net/

anyway theres several things i cant figure out
where do i put teh phpThumb files? do i upload them with my site to the root folder and refer to it from there? also it says it uses the GD library. does that mean that i have to download and set that up as well? if so where do i put the GD library? it appears that GD is something that the server needs to actively execute. am i going to be restricted to sites that are running GD all the time? in order to get php thumb to work do i have to put some kind of include or script at the beginning of my html document.

none of these simple questions are addressed clearly on the phpThumb site.

Thanks for your help in advance.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The code itself, can likely be placed anywhere you can call it from. As for GD, you should check to see if it's installed and loaded using phpinfo()


Moved to PHP - Code.
Kaervek
Forum Commoner
Posts: 25
Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:

Post by Kaervek »

i know that i can place the code in my html document for example
"<img src="../phpThumb.php?src=images/disk.jpg&w=200">"
but i cant figure out where to put all the files that come with the phpThumb download. the readme file doesnt seem to say anything about it, it seems that most of these things assume that people know how to set them up

also i have to make a distinction between my local system and the server. is it a fact that something like this will work when you load the page from a weserver but may not if i just open the html file in IE from my local machine?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

in all probability, their code doesn't require a specific location, per se, as long as GD is available to their code.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I've played a little with phpthumb this weekend ;)
Here is some code that i wrote (i didn't feel like using the standard phpthumb script, so i used only the class)

http://timvw.madoka.be/programming/php/ ... il.php.txt
Kaervek
Forum Commoner
Posts: 25
Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:

Post by Kaervek »

ok
it seems that way to me too

so is GD something i need to install? if so i should how do i go about installing it in my webspace?
Kaervek
Forum Commoner
Posts: 25
Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:

Post by Kaervek »

timvw

thanks very much i think that may help me in the future

from what knowledge i have of php (which is precious little) im going to guess that is a file you made called thumbnail.php but you just saved a text version called thumbnail.php.txt for me and others to view? and from your description this is a rewrite of something that comes with phpThumb?
require_once('../../init.php');
require_once(TVW_EXT . '/phpthumb/phpthumb.class.php');
this is the kind of thing im wondering do i need to put into my html document to get this thing to work. or did you only have to use these kind of include statements because you rewrote some of their code?
Post Reply