...

View Full Version : HTTP-Status



Chris-2k
07-11-2012, 01:20 AM
hi guys need help!

function i want to use:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function

i want to initially use
content/system_error.php hmm wandering; should i add the said func to:
generic.func.php an then call it as
HTTPStatusError();

tangoforce
07-11-2012, 01:56 AM
I don't think it matters where you add it as long as the code is in your project somewhere.

Seeing as we know nothing about your project, there isn't much we can do to help really in the way of advice.

Chris-2k
07-11-2012, 04:53 PM
Well it's an image script...

What do u need to kno m8?

Chris-2k
07-11-2012, 06:03 PM
Hi

imgettting

Warning: Missing argument 1 for HTTPStatus()

what?

tangoforce
07-12-2012, 12:32 AM
Well it's an image script...

Erm, no. The code at that url is for http status's. It's nothing to do with images unless you mean your script is an image script (things like that you should have mentioned).


What do u need to kno m8?

Wy u us netspk al ovr da plc? No seriously, you asked us a question about where to put the code. Unless you're going to tell us about the structure of your project, how do you expect us to know the best place for it to be put? :confused:

Chris-2k
07-12-2012, 01:07 AM
Sorry for the "netspk" mate.

Yes my project/script is an image script, consists of content dir, and includes dir, inside we have:



content dir:

content/themes/(THEME NAME HERE)/

includes dir:

includes/form.php
includes/init.php
includes/functions.php
includes/template.func.php


I don't think it'd go in my theme files? I'm thinking my init.php or preferably functions.php which is there now.. And seems OK, only how to call on system_error.php?

tangoforce
07-12-2012, 03:05 AM
Thats more like it!

I'd put it in the functions file.

Chris-2k
07-13-2012, 10:56 PM
So, when im calling it i must pass a var/argument.

What argument?2

tangoforce
07-13-2012, 11:07 PM
The http status code number is the arguement you pass.

It's clearly taking a numerical arguement and then selecting an array value based on the key being the same as the arguement passed to the function. Must be said, I'm a bit shocked you've decided to use a function that you've no idea how to use or what it does..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum