better application support
well why bleed when you can stay stable? :p
Windows is the OS of yesterday with Vista released
Err... you didn'T get that linux hosting thingie, did
you?
vista is windows
.oO( He's walking around: WHAT? You moron are using Linux?
Better use Fedora!
Vista sucks.
Hard.
it has its uses
First thing I did was turning off all that "funky" new Vista
stuff.
but yea i tend to agree
At least everything that I was able to turn off. _
i'm lost. both Fedora and freebsd are distros of linux
Hello all. Anyone have any experience using php_iisfunc.dll? I
have two lines of code -- one works, the other fails... and I can't
figure out why...
:O
Too bad that my graphics adapter isn't supported by any other
OS. _
i prefer fedora core 5 but i cant run my games on it as linux
eats up too much of the memory
it's uses? are what?
You really want to be slapped to death, don't you?
i thinjk so haha
can't play games on it because it doesn't support video very
well
urm...
can't give it to grandma because it's to hard to use and breaks
to much so she'll never leave you alone
getting more money for small computer firems (the ones that
make computers and sell them)
vista is useless
and making bills bank manager happyer
yea
bsd is not linux
similer but not the same
freebsd isn't a distro of linux?
o0
not even close.
i've not worked with it at all
well piss
http://en.wikipedia.org/wiki/BSD
If BSD was Linux... why would FreeBSD need a Linux
compability layer? _
http://en.wikipedia.org/wiki/Linux
Have at it
Oh, wait.
they share some past
WinXP also has a Win95 compability mode.
Doesn't work at all but at least it's there.
eheh
Anyone know of a flat file DB implementation that supports
ODBC connectivity? =/
i do think fedora is the way secure linux web hosting can
break into the mainstreem. they are getting good at keeping the
security and making it dumb ass frendly lol
gumpish, sqlite?
See?
I am not sure, but I think you can odbc csv files
Linux is the freak system of today and the default system of
tomorrow.
I aggree with you. Fedora is the easiest migration from
Windows to an alternative
so far I think ubuntu is becoming more mainstream than
fedora
but yeah, if linux goes mainstream, I'll switch to FBSD
why?
So FreeBSD, which is the outsider system today, will be the
freak system tomorrow... and the default a few years later.
way to be a nonconformist! whoo!
"years later"
how many decades is a year?
owenm, nah, a way to keep from being a target of viri
:P
Did you already buy your personal host nonconformists army
uniform? -g-
in php host 5 there is
no domxml_open_file, what should i use instead of it ?
hi all. i have zlib.output_compression On locally via htaccess
but my files are not delivered as gzip compressed. any ideas what i
am doing wrong?
LordDoskias, php.net/dom
Mhh... about 0.1 IIRC.
_P
That is a very good point about viruses and heading towards
mainstream
hm, interesting approach... the alternative (patching and
intelligent computer use) appeals to me more
cythrawll, i'm rading about it
Give or take.
i can't seem to find the correct function
or class
Some decades last longer than others.
ahah
owenm, who says you stop doing that with my approach?
found it ;p
just hope the virii aren't POSIX compliant...
POSIX isn't an implementation.
The code still differs.
Ok. Still could differ.
POSIX compliant
I'm not a kernel hacker. :
if that's like w3c compliancy between browsers and clients
I don't think I have much to worry about.
Yeah! html host virii!
\o/
haha
But I wrote a javascript
firewall, so I am safe against them! HAHA!
xD
it's not enough SlashLife
i a near future of webOS that might became useful
hey
better get an AJAX(tm) IDS
i have problems with exceptions after upgrading from 5.1 to
5.2
http://comet2.sjr.fi/trycatch.phps
they must have fixed something
http://comet2.sjr.fi/trycatch.php
If it shouldf become necessary, I'll add DOM tree
heuristics.
is it a bug, or a known change? if it is a purposeful change
in code style, what should i change in the code?
lnx^: I'd clearly say that it's a bug. :
It should've been caught
lnx^, what php version ?
5.2.3
Did you try subclassing Exception and throwing it?
http://comet2.sjr.fi/phpinfo.php
when has any exception-handling code been changed? what could i
downgrade to?
lnx^, can't reproduce
ok hmm
this is with 5_2 dev though, let me test with 5.2.3
bleh... are there any login/page protection scripts that
don't rely on MySQL? Something simple like PHPPageProtect but less
abandoned and with fewer known XSS vulns...
I'll try to test too
Why don't you simply use HTTP authentication?
I have 5.2.3 on one of my servers
lnx^, nop, can't reproduce
lnx^, php -m and php -v please
because then I'd have to have shell access to run the htpasswd
tool to create new users...
You don't.
You can also write the .htpasswd files using PHP.
o_o
I don't know the exact format now, but you'll most likely be
able to find something on the web.
How do you suppose the script to store the login stuff then?
)
i'll try compiling it from scratch, i have an exec-dir and
mail-script patch in it
(while waiting for pastebin.com to start working again...)
but... i need to make it RAW!
looks like google is chock full of php/htpasswd tools
indeed
!+pastebin
Submit your text to http://hashphp.org/pastebin or
http://cpp.sourceforge.net
or http://pastebin.ca then tell us
the URL and a summary of the problem. Don't flood by pasting in the
channel.
thanks
there are enough other pastebins
You'll need root privileges then.
http://hashphp.org/pastebin?pid=21570
posix_seteuid doesnt work either..
lnx^, I couldn't reproduce either on my 5.2.3
Why don't they list our pastebin here? -gg-
lnx^, try without Zend optimizer
SlashLife, bah, because there are enough other pastebin
But they all suck compared to ours. :
heh
link your yours?
Hi, i have this http://www.pastebin.ca/561927
data in $message, if i use base64_decode($message) i get zero
results, how is it supposed to work?
nopaste.php-quake.net
!+pastebin
Hey everyone, when you are beginning a project that requires
user management and authentication - do you use an opensource
project or do you just create your own stuff?
my security common sense usually tells me to roll my own
paste2.org is the one i like
http://comet2.sjr.fi/trycatch.php
that's the result with the eaccelerator zend extension
disabled
lnx^, so it's fine
yeps. so where is the problem?
in eaccelerator?
lnx^, I had a similar problem with another opcode cacher on one
of the servers, there may have been some changes in opcodes
generated that those eacc/APC don't handle well yet.
ok, i guess i can't do anything but disable eaccelerator for
now then, there is no newer version available
lnx^, http://eaccelerator.net/wiki/Release-0.9.5.1
here we go
i got that already
oh yeah
it says known issues
thanks, i'll just wait for a patch
thanks for your help!!
you're welcome
hehe cu
gentoo 4ev4 btw
yay for gentoo
lnx^ you didn't upgrade your accelerator when you upgraded php?
:O
hmm thats a pretty big eaccelerator bug, and it's going to be
a hassle to recompile and upgrade
cythrawll, because there is no newer version of it available yet
?
good thing i don't use exceptions
ekeuss, in that case shouldn't one atleast recompile?
Will be $var{char} construction removed in PHP6?
SettlerX, http://www.php.net/manual/en/language.types.string.php
Characters within strings may be accessed and modified by
specifying the zero-based offset of the desired character after the
string using square array-brackets like $str[42] so think of a
string as an array of characters. Note: They may also be accessed
using braces like $str{42} for the same purpose. However, using
square array-brackets is preferred because the {braces}
style is deprecated as of PHP 6.
is there an online cli available to test snippets of
php?
You could just install the CLI...
Handy thing to have.
is it available for the mac?
I have trouble compiling the mysql extension for php4 (need
to link it with the new library)
Sure, I imagine fink or macports has it packaged.
`OnUpdateInt' undeclared here (not in a function)
I'm kinda surprised Apple didn't ship it, don't they ship the
apache module?
should that be declared in some php include or in some mysql
include?
also, isn't there a bot in this channel that does the same
thing?
nils_, you updating php or mysql?
updating mysql library, and recompiling the php4 extension
correct?
yes
how did you upgrade mysql?
installed via apt-get, libmysqlclient14-dev
and libmysclient14 obviously
ok was making sure you got that dev package
(most common mistake)
nils_, pastebin around that error?
like 10 lines above it, or all of the output of make if you
prefer
yeah wait a second... it's the first error thrown by gcc, so no
complaint about missing header file.
orly? thats odd
http://www.pastebin.ca/562254
indeed.
well I just change the users to old password scheme in mysql for
now, no time for long debugging as site is down
is /usr right?
yeah, prefix for mysql installation
mysql installed via apt, so it's /usr
I'll just use the old password approach and don't recompile, not
worth the hassle
ls /usr/lib | grep mysql
ls /usr/include | grep mysql
it's all there.
else gcc would complain that it doesn't find the header
files...
nils_, try without that --withmysql stuff
it'll use the bundled library then (old php)
if your using phpize, it's shared... and /usr should be
default
ok
same error
you using 4.3 it's all old php for you....
yep
bundled library? you have mysql compiled in as static right
now?
don't know how debian does it, but it uses
libmysqlclient10...
but dsos for extensions
dsos?
Debian does not use PHP's bundled mysql library. It conflicts
with other packages too often.
most php extensions are not statically linked in debian.
\o/
but I give up on that whole compiling thing
thought there might be an easy fix, but I'd rather use that
other easy fix
install 5 and call it good?
no one will notice
.
setting passwords to old password scheme in mysql
might try --prefix instead of --with-mysql
I have a feeling it all has to do with your configure
argument
cuz i don't think that's right, not right atall
i am trying to set a property on a COM object's
RenderParameters property, in c# i use set_RenderParameters(name,
value), what or how do i find the equivalent to thsi in
php?
is there a way to move DomDocument-documentElement to a
different DomDocument as a sub node... DomDocument-appendChild(
DomDocument-documentElement) does not work...
it works for most other modules
just consider it solved
NOES I WILL NOT GIVE UP
KWhat, so two different DomDocuments?
yes
DomDocument1-someChild-appendChild(
DomDocument2-documentElement);
don't you need to import the node first?
I get a Wrong document Error exception
Try passing a DomElement object instead of a DomDocument
one
tried does not work
what garotosopa said?
how do you mean import first node ?
no import node first
not import first node
KWhat, try to d1-importNode(d2-documentElement);
let me give it a shot thanks
actualy $elementNowInD1 = $d1-importNode($d2-documentElement);
// them you append $elementNowInD1 wherever you need it
then*
$d1 in my case is a domElement... i get call to undefined method
DOMElement::inportNode();
how to tell PHP to write files in ASCII encoding instead of
unicode?
KWhat, you need $d1 as the DomDocument
ohh i see e
KWhat, and you probably need to pass true as the second
argument, "this method will recursively import the subtree under
the importedNode."
importedNode(obj, true) ?
yes.
Hey all - how can I kill all chars in a string that are not
numeric, i.e. change "John Doe (678) 555-1212" to
"6785551212"
bakermd, $str = preg_replace('/[^0-9]/', '', $str);
dang, beat me to it
exactly!!!!
thanks again, that was perfect
may wanna try [^0-9]+ though, bakermd
Thanks - will try
it seems to work both ways - what is the significance of the '+'
?
I'm no reg-ex expert, but afaik (but obviously not the case) I
thought that [^0-9] would just match a number in that range,
whereas with the + it would match 1 or more
that + would apply in something different, like /^[0-9]+$/ in
a preg_match, meaning that it would only match string with at leat
one number. when replacing /[^0-9]/ by '', it means that any
non-numeric char will get replaced, thus the isn't very useful
here.
sup all
"mail/index.php?search=test&msd=yes" ??
Thanks
if ( $_GET['search'] == 'test' && $_GET['msd'] ==
'yes' ) { include( 'foo.php' ); } else { include(
'I_need_food_.php' ); }
er, for samuel ^^
samuel, $_GET['search'] == 'test'; $_GET['msd'] = 'yes'; include
'mail/index.php'; --keep in mind that it's a workaround for a bad
design
oops, it's just one = sign there ^^
thanks, but thats not quite what i mean... i want to include
index.php with the GET variables in the page
then look at $_GET
wait
im stupid
Hello.. I'm having a few problems with some xml. basically the
xml document I'm working with (that is hosted remotely) doesn't
have the encoding set. so when I'm using simplexml, I get an error
of http://rafb.net/p/L2ukDY19.html
I'm unsure how to set the encoding of the document
why not just store it in $_GET like AlexC_ states, should go
through to index.php no?
ah ok.. so the document is apparently invalid perhaps
you want to include a file, and have it passed $_GET
data?
if the variables is already in the main script in the $_GET,
then it will be available in the included script as
well.
yes, but the array $_GET should go through to the included file
no?
should be ok i guess...
see what garotosopa said
for example if I do $foo = 'bar'; include( 'hehe.php' ); - the
file hehe.php will be able to use $foo
include is just like copying and pasting the whole file in that
point.
yeah... i know i am just stupid here... i didnt realize
Hey again all. Quick question -- when a program is run in PHP,
it gets its own interpreter, correct? And any functions it calls
inherits that environment?
Why do I have to do $tmp = f(); echo $tmp[0]; instead of echo
f()[0]; where f() is a func returning array?
Hi. Lot's of my mails to our users get classified as spam. My
own mailserver even says my message-id is invalid.. Are there
placed i can send a mail to and get an evaluation
report?
it's just how you have to do it in php (not sure if it's like
that in other languages)
dunno, I always wondered the same thing... just extra
syntactic sugar PHP doesn't have.
owenm, php does not offecial support sub interperters
I hoped for some rationale, not that just it is not
there.
OK, let me run this by you and see what you think. (BTW,
PHP/IIS/Win2K). I have a PHP script that runs as nobody, and one
that runs as a privileged user. When I'm in the nobody script, if I
call the script that requires privileged access, the function runs
as nobody. Any tips on how to get that to not happen?
But thanks anyways.
I doubt the php script runs as a priviledges user to begin
with
if you do a plain include, it will use the same interperter, all
vars will be left intact
ah, but it does when I call http://foo/priv.php, all works well. when
I import priv.php and then call bar() inside it, it fails
miserably.
and any function/classes too
then you can not directly include it
setup the server to give the including script the permissions
too
or invent a fascade solution that let's them run in separate
interpertes
like subrequests, runing on with a cli running function or
something like that
OK, I figured something like that would be the end result.
Thanks.
one php interperter can only have the priviledges of one user.
PERIOD
Hi. Lot's of my mails to our users get classified as spam. My
own mailserver even says my message-id is invalid.. Are there
placed i can send a mail to and get an evaluation report?
one user. INTERROBANG
how can i use HttpResponse::redirect
i'm using php5
T-Start: what's your message-id look like?
shouldn't i just be able to HttpResponse::redirect( ) ?
Hey. Anyone know a free script which can strip HTML tags AND
attributes from a string?
sproingie, it was md5(date(r).$messagebody).".M1.STPK"; Now i've
added '@domain.com' at the end. But it's still invalid
strip_tags also strips attributes...
true
you sure?
I am sure too
I want to only strip certain attribs..
yeah, why should it not strip attributes?
it can not do that
T-Start: are you enclosing it in angle brackets?
no
I'm using fopen() to get an HTML file from another server,
and I need to clean up the HTML a little..
T-Start: do so
DOM?
Hmmm
Message-ID:
382a987574c8fea51d9ee721654707ec.M6.STNL@startnl.com
I'll look into it
I dunno if it is overkill for what you need, but it might
work.
you say it should be Message-ID:
'382a987574c8fea51d9ee721654707ec.M6.STNL@startnl.com' ?
not quotes
Message-ID:
382a987574c8fea51d9ee721654707ec.M6.STNL@startnl.com
oh
darn, now that you say so
tx, i'll try
how clean do you need your html? what are you doing to
it?
are you doing body extraction?
regex
i use firefox's internal rendering mechanism as a service to
clean up html since most pages on the internet are
malformed
try libtidy/php
hi there, I am using system with a second argument -expecting
that the stdout will be store in this second argument
but it keeps on outputing the result on the page
can someone tell ,e why ?
alexIdoia, must pastebin
because you are using system.
http://us.php.net/manual/en/function.exec.php
oh the function system() got it
System stores the return value in the second argument.
what do you mean, it is buggy ?
I can read code better than I can read people
that is what I said, but it still ouputs the result on the
page
http://us.php.net/manual/en/function.exec.php
http://us.php.net/system
try it with a simple:system ("ls",$r);
System implicitly displays the output. Use exec to capture the
output.
exec('foo', $stdioArray, $return_value); should do what you
need.
given and array of key value pairs, such as 6=7,8=10, and a
variable equal to one of the keys, can it easily be converted to
that key's value? For example, convert $var = 8 to be $var
10?
so system() does not work properly ? or does the second
argument means "it displays the ouput AND put it in the second
argument"
alexIdoia, the documentation says it should output it to the
page :p
I think you are confusing return values and stdio. System and
exec work perfectly.
System displays stdio to the screen, and stores the return value.
Exec stores the return value AND stdio.
alexIdoia, it displays output AND stores the last line in the
second argument.
arg! what aboutif I don't want it to display at all
sorry return value
then use exec()
if you don't care about stdio OR the return value, just call
exec('foo');
ok
but if you need stdio or the return value, read http://us.php.net/exec
i would love a link explaining how to read data from associative
arrays
i can't seem to figure it out
print $array[$array2[key]]; is appearantly poor incorrect
syntax
anyone?
http://us2.php.net/manual/en/language.types.array.php
thank you!
that should work.
is key a constant or a string?
string
Hi, whats a salt value?
then it should be a string -- 'key'. it mentions that in the
documentation link I gave you.
i am using PHP and COM and I am having difficulty working
with a property called RenderParameters, in the Jscript example it
is retrieved using get_RenderParameters("parametername") and set
using set_RenderParameters("parametername", "value")
look at Array do's and don'ts
how would i do the equivalent in PHP?
thank you very much for the link
np, tell me if that doesn't get you going.
ok
http://en.wikipedia.org/wiki/Salt_%28cryptography%29
aw, just missed him
pastebin whatever you have so far and I can take a look... I was
just banging my head against the wall with PHP/COM.
what is a pastebin url?
I use pastebin.com... i guess #php doesn't have an official one.
huh
I'm used to seeing one in the topic for the channel. go
figure
well the code causing the problem is only one line
OK, then paste that line in here
thank you for the link. everything is working now.
here is what i am using to set the property
$renderparameters = $mapserver-RenderParameters("Identified Sites",
"48043");
$mapserver is the COM object obviously
its coming back with:
Error [0x8002000e] Invalid number of parameters.
is there something i can use as an object browser type thing for
this?
you can try com_print_typeinfo(comobject) to get some
info.
into <b>
reflection api
?
htmlentities
honestly, though, I suck at COM programming... so you might want
to grab someone elses help. sorry
thanks
frankly I gave up on COM pretty quickly when I ran into
it
the output from that function for the property is:
damn
its got a comment:
DISPID=1610809359
VT_BSTR [8]
there is also 2 variables with the same RenderParameters
declared
'lo - I'm reading from a device (specifically a USB barcode
scanner) - there's no driver so I have to read directly from the
device in /dev --- I don't know how much data or when it's going to
send, so I can't just fread()
is there something that will check for data and continue
executing if it doesn't get any (returning false)
ugh, you are so deep into com I'm way over my head...
I haven't been able to find anything --- and
stream_set_blocking()/stream_set_timeout() don't seem to affect
it.
http://rafb.net/p/ogYZAa70.html
but the file only contains a '1'
ok thanks for trying to help i appreciate it
devhen|Work, how are you trying to write them
see the pastbin
can you file_get_contents() / file()
hrm... that problem was biting me today...
owenm, since it's a device (/dev/uhid0) not a file, not likely
no...
the "contents" changes
ill try though
I got it!
really? and ?
haha @ devhen|Work
you're missing a parameter in print_r()
try print_r($blah, true); I think that might do it... but now
I'm not so sure
owenm, nah you got it, that's definitely it
sweet
I've done it before.
print_r() is an anomalous function afaic
ahhh
and yeah, I get what you mean about the contents changing.. hmm,
do you poll it on an interval?
I'd *like* to poll it on an interval
but polling involves freezing + waiting for data, instead of a
poll...
which would freeze the app
right, and you want a good ol' nonblocking IO.
yeah...
I have to make this application do *everything* for these
people
thanks sol owenm
np
the people who are going to be using this app...
they decided they'd clean an electrical cable plugged into some
of the company's hardware...
with a knife...
while it was plugged in...
... wow.
not the smartest bunch
I'm not sure if they learned from getting slightly electrocuted
or trashing the hardware
but I hope!
hmm, so you want to connect PHP to the device and just
wait...
right?
nope, I don't want it waiting
I dunno if this could help you, just throwing out a guess, but
this comment has a thought for fifo reading that could apply (since
/dev files are sorta like fifos...) http://us2.php.net/manual/en/function.fopen.php#59885
I want to loop through my entire application, and if data comes
in I'd like to read it
check out that comment... it _cou... wait.
can I use a separate thread?
alright, I'll check it
afk sec, im needed
Date( "M jS, Y \A\t g:i a", strtotime($row["timestamp"]) );
1
I need 'At'
Can I pass variables even if my page is in frames? I've been
stuck on this one problem for days now
try http://us.php.net/pcntl
(when you return)
Maybe someone can look at my code?
hola
try \At, does that work? For some reason I think it might... but
a guess
checking ty
can someone tell me what the difference is between isset($var)
and !empty($var) ? thanks.
signal handling?
$query = "SELECT * FROM `news` WHERE
ID=".$_POST['RadioGroup1'];
SnakeO_, \A\\t
or, alternatively, use single quotes.
pastebin.com if its a lot.
doesn't work
Thats my code, the Radiogroup is on the FIRST PAGE and I want
it to pass to the SECOND PAGE but it aint working
Kthx
i think file_get_contents may work.
SnakeO_, well, it should
sweet!
single quotes works
why?
hrm nope
you set up the form actions correctly?
SnakeO_, \t gets interpolated as a tabulation char inside double
quotes. But \\t will also work inside double quotes.
oh yeah \t = tab . duh, thx
The form action transfers to the other page
but you know what, I didn't SECONDPAGE.PHP?VAR=X it ....
isset checks to see if the variable is set. empty checks to
see if the variable is empty ("" is empty, null is
empty)
hi there
That might be the problem
one sec
that's a $_GET, not a $_POST.
is there any good php script that makes me a photo album from
my pictures
I'll paste all the code:F
One sec
i wouldnt mind it to be secure and simple
the advantage comes in if $var = 0.
#php for that sort of stuff
is there any way to change the current working directory of
an included file in php?
me, I'd just make my own
or use flickr or something
cythrawll, yes but i tought about security that is why i ask
here
okay. not sure I understand completely, but I'll keep poking at
it.
empty($var) is true, but we don't know if it is null or zero
or what. isset($var) is more specific.
thanks.
google told me a few about
http://us2.php.net/manual/en/function.empty.php
(have a comparison there)
security? php?
bwaha
pastebin isnt working
any other sites like that ?
pastebin.ca, pastebin.com, anyone will do as long as you give
the link
hashphp.net still has a pastebin i believe
!+pastebin
Submit your text to http://hashphp.org/pastebin or
http://cpp.sourceforge.net
or http://pastebin.ca then tell us
the URL and a summary of the problem. Don't flood by pasting in the
channel.
or .org sorry
its pretty easy to make a simple gallery.
How come nobody is capabe of typing "pastebin" into
Google?
is there some way to see the value of the pointer to a php
object?
ops and there wonderful bot tells
(to be sure two objects are in fact the same one)
other channels let regular users use their factoid bot too
:p
Wolfpaws, if only people were capable of reading the manual,
there would already be less need of pastebins
http://pastebin.ca/562596
Thats page 1
Tough luck
you need to make an indexer, a thumbnailer of some sorts, and 2
scripts to display fullsized images and "folders" as
"galleries"
Directories!
It's directories!
hmph i'll create my own unofficial php channel with happy
sunshiney ops
thats why I quote it
Folders are thick black thingies with lots of boring paper in
'em!
I don't see the difference between the second and the third
argument for exec()
!+func exec
http://pastebin.ca/562603
string exec(string command [, array output [, int
return_value]]): Execute an external program
Page 2
hey again ok, when you run a program, you get a return value.
for example, if you do ls, you get 1 (if everything works well).
you don't _see it_, but it's there.
alexIdoia, return value is not necessarily the output
What does that say?
you using unix or windows?
if you've done any bash scripting before...
Wolfpaws, is that func reference updated a bit ?
ah ok you mean the exit value right ?
I get it
ok, is this edit.php that gets called in the action?
not that I know of
Edit.php will be recieving the variable
yeah, thats it!
*ALL* PHP channels are unofficial
cool, that is handy
Ideally I would like to choose my post I wish to update/edit
from PAGE1 send the posts ID to the EDIT page so then I can do a
select using that ID.
Well, if you want PHP5 ref, you want func5 blah
Wolfpaws, yeah... that had no bearing on my statement, I guess
it was a bit extra, but I felt like highlighting that point a
little.
OK, let me glance.
Wolfpaws, I see. Well it would be nice to have it updated
once in a while, especialls because those infos are already auto
generated
I have an url like
/directory/scriptname.php?page=3#this_section .. how do i get the
#this_section part in my script ?
I actually need to check, how that works
Only with Javascript
parse_url
right.. i suspected that.
hmm. what do you see if you print_r($_POST); in the edit.php,
out of curiosity?
I'll check one sec ...
target isn't server-side action
you can pastebucket it again
Edit )
Thats all I get
Maybe it would be easier if I stored the ID in a cookie
somewhere?
heres your problem, i think.
declarations, with the post in the second.
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/genfuncsummary.php?revision=1.4&view=markup
and on other scripts located here
so all you post is what's in the second, the edit button.
remove lines 190 and 191 (from the first pastebucket)
and change line 105 to edit.php and I think you might see it
work better
I have to first find out, where to put it for the 'bot
ah well, that, I can't help
Thanks! Ill try this
I think that should do it. Good luck :0
Gotta run... done for the day... good luck all, see ya
tomorrow
whatever happened to this syntax (i seem to remember it
working):
php
if (conditional) {
?
it'll echo whatever's here
php
}
?
anyone up to an interesting question? http://pastebin.ca/562640
recursive summing of tree nodes, problem with references
as_df, please, use a pastebin
Actually, the reson why I have 2 forms is because I have my
SUBMIT NEW POST button which will not load a new page (it just
inserts my form to the table)
omry, sure, what is your issue ?
And I made another form control just for my EDIT feature, which
I want to bring me and my variable to another page
(edit.php)
http://pastebin.ca/562653
ekneuss, check the code from pastebin. there is a little
explanation on the top.
ekneuss, the data values are not initialized after the function
runs
you use leafs to store the data ? o.O
guys... what do I have to do to get a variable declared outside
of a function to be usable in the function?
Don't to that.
nichtj, global $var; // inside the function
ekneuss, why - yes, I do.
So is it possable to have 2 forms on one page?
anyone know of a way to bold a font in GD2 without actually
having the individual ttf file for the bold version of that
font?
but the var is declared outside of it
omry, well, it depends on the tree, but usually values are
stored at each nodes
nichtj, that's why you're telling it to use it from the
global scope.
hm, well
ekneuss, for me the values are on the leafs. and I want to
calculate values for all the nodes based on leaf values.
it still didn't work
(php 4, btw)
why not
ekneuss, its a problem with references, I bet.
omry, php4/5 ?
nichtj, pastebin
sec
ekneuss, 4.4, but it should work on both.
omry, ok, let me take a deeper look in the source now
ekneuss, sure.
http://hashphp.org/pastebin?pid=21636
$this-$children[$key] = $childTree;
basically I'm trying to be able to manually override the $page
setting
for pages where the filename won't match
nichtj, use the global inside the function, not in the global
scope.
ekneuss, how so?
omry, $this-children and not $this-$children
so delclare it normally on line 2 and then say global $thing
inside?
ah, crap. sec
nichtj, yes
I will try it, thanks you!
ekneuss, it didn't help.
I updated the code to include test code:
http://pastebin.ca/562684
thanks!
omry, $cl = &$test-newchild()
ekneuss, still nothing.
omry, the other one too
yeah, I did that
ekneuss, http://pastebin.ca/562692
omry, you forgot before calls of data() too
ekneuss, and I should probably remove the one in the function
call, right?
the declaration should be enough
omry, nope, it's not
ekneuss, I think its working now
any way to get var_dump to dump it all? (and not crop at a depth
of 2?)
ekneuss, anyhow, thanks for your help.
omry, sure. Dont forget that assigning by reference is not
the same as returning by reference, if a function's return value is
returned by reference and then assigned, it also needs to be
assigned by reference.
ekneuss, yes, I saw it in the docs.
ekneuss, I also notices that when passing by reference you are only
supposed to declare it in the function
indeed, calltime pass by reference is deprecated (but still
works)
ekneuss, so this is outdated :? http://il.php.net/manual/en/language.references.pass.php
omry, nop, it's ok. by call-time pass by reference I mean
that you tell the function to take a reference at runtime, and not
a compile-time, echo foo(&$a); vs. function foo(&$a) { ..
}
ah
gotcha
so I was right to say that when passing by reference, the
function declaration is enough.
yep
could someone kindly tell me how a php script can read lines in
a text file (with fopen) and run a mysql query for each
line
UltraVi01, php.net/fopen , php.net/fgets ,
php.net/mysql_query
yes, i know
then where is the issue ?
hello, can I work with $_POST as a normal vector ?
amimusa, by vector you mean array ?
i mean $_POST[3]; ... and so
yes, sorry
No, it's a hash.
what hash means
amimusa, if that value exists, sure.
http://pastebin.ca/562717
Positional arguments wouldn't make sense.
what is this pastebin UltraVi01?
what I have so far
shouldn't pg_fetch_assoc return null if the table is
empty?
echo count($_POST);
echo $_POST[3];exit;
shows
37
Undefined offset: 3 in
amimusa, you can't access associative entries like that
what would be the point by the way ?
so i can't access to the $POST array with index ?
then ...
what would be the point of that ?
i have a lot of entried and i don't know all since there a re
alot that are hiden
input
amimusa, you can iterate through the array using foreach() for
example
i am looking the way to get all values by post, but without
eval
$valor)
{
$asignacion = "$" . $nombre_campo . "='" . $valor .
"';";
eval($asignacion);
echo $asignacion."";
$msg = "[" . date("H:i:s Y-m-d") . "][" . $newId . "][POST]
$asignacion\n";
file_put_contents("$playlist_log",$msg,FILE_APPEND | LOCK_EX );
}
!+pastebin
Submit your text to http://hashphp.org/pastebin or
http://cpp.sourceforge.net
or http://pastebin.ca then tell us
the URL and a summary of the problem. Don't flood by pasting in the
channel.
somethins like this but without eval
sorry\]
amimusa, you're looking for php.net/import_request_variables
which is quite a bad habit to use, by the way.
so don't advice than lol
you're using eval, anything is better than eval.
is there any function to find the memory usage of a
particular data structure?
(as opposed to the memory taken by the whole PHP process, or the
number of elements in an array, etc.)
$asignacion = "$" . $nombre_campo . "='" . $valor . "';";
eval($asignacion); // why not $$nombre_campo = $valor;
amimusa, ^^
brickbrite, memory_get_usage before and after
I'm trying to preg_replace [\r\n] a $value returned from
mysql_fetch_array() for each $key. I know the regex isn't the
problem, but the value always prints as though the preg_replace
didn't work. Is the value read only or something???
garotosopa, ouch, nono.
ekneuss, thanks, that's helpful
ekneuss, isn't that what he wants?
eibwen, first, get your regex working on a single
string...
'/[\r\n]/' works in perl
ekneuss, ohh I see. that was a foreach $_POST. extract() would
work better.
garotosopa, indeed
eibwen, oh, like THAT could never cause any
misunderstandings...
cythrawll security? php? cythrawll bwaha , what do you mean ?
php isnt secure ?
kexman, no need to start any troll.
heeh ?
kexman, I was mostly joking
lol he left
I am making a simple user management system for a site and am
learning OOP as I go (small project doesnt really NEED it, but it
will be a good way to learn). Is it okay to create an object within
a method of another class?
hey guys. i'm trying to use mail() function to send mail
(obviously). i'm setting up extra headers to be From: user@host,
but the mailserver bounces them since apparently he is getting
something like mail from: www-data@server. any ideas?
That is a commonly used pattern called a Factory method.
Usually you use it to transform some raw data into an object
representation. For example if I have several different types of
event data comming in from xmlrpc, I can pass the string to
getEvent() and it will return an object of proper type for that
event.
When doing it this way, make sure to privatize your constructor
in your factory classes.
i have class that handles my mysql connection. I also have a
class that represents a user. So if i want to register a new user I
want to connect to the database (new connection object) then use
registerUser method to input info in mysql table. in the code am I
better off calling both methods separately, (ie new connecton; new
user; register) or just new user and in the register...
...method create a new connection object. (long post sorry)
Usually I create a DatabaseClient class that manages the
connection to the database. It connects on construct, disconnects
on destroy etc... I then inherit my models from that so I don't
have to worry about the connection.
any help with sending mails?
Alot of people try to use object relational notation to match
objects to SQL tables, I do not do this so I cannot help you if you
are trying to design that way.
Or object relational mapping, ORM. Where did I come up with
notation from /boggle
for some reason my fget isn't ending at the end of the
file
it loops
'morning
nevermind
is there any scripts out there
that support ftp
for a website
d-media: net2ftp
where can I get the framework for it?
you can take the whole aplication from net2ftp.org if i
remember
**right
yea I see it at net2ftp.com
downloading it
ok
is it pretty easy to install
have a look
d-media: in all that time that you're here, have you ever
bothered to Read the manual of what you're looking and/or examples
for it?
ftp functions .... they are into the manual
i didn't though about that
yes, yes they are.
0 here
0
cool
nice program
hehe
Is it possible to increment an array's key in a for
statement?
I require a solution that will allow me to increment the key
value in an array to view the next value
I don't get it.
next() ?
Let me checkout next on the manual
bluefusion1, look at foreach
Okay thanks
for($i = 0; $i $n; ++$i) echo $a[$i] ?
$stringone = "$this$is$thestring"; but $the is a variable and
string is just part of a string
$stringone = "$this$is$the"."string";
$this.$is.$the."string";
foreach is better less memory consumed
i thought there was something about brackets you could use,
something like: $stringone = "($this)($is)($the)string"; something
like that
{}
alecs, but concatenation is faster.
its {}
aaaah!!! thats it, thanks
I mean samuel, sorry :p
i see, thanks
unless you have a limit - say 3 of 5
In the foreach statement, what does as represent?
i don't understand the question
as is as ... mmm ... ;-)
bluefusion1, as means that the etch item of the given array
will be known as iterator
foreach reads the entyre array
for example :
foreach(explose(' ', $sentence) AS $word) { echo $word; }
foreach ($array as $key ) {echo $key}
"hello world this is a sample"
foreach ($array as $key=$value) { // Code here }
Fser, what was that? my client crashed just as I was reading
your message. . .
huhu ..
I did nothink :p
ah
maybe this test
maybe this test test again
What does as mean in foreach?
I don't understand it in contrast to the for statement
this is just grammar :p
something like "for each item in $array, use it as
$value"
foreach( ... as ... ) - the 'as' is only a delimiter
Well I mean for (x=0;xy;x++). . . is that check not possible
in foreach?
foreach ($array as $key ) {echo $key}
foreach ($array as $key=$value) { // Code here }
Declaration, evaluation, and incremation
bluefusion1, nope.
foreach is a foreach, it's not php specific
this is to iterate the whole array.
alecs: "foreach ($array as $key) " is a really BAD
example!
i have an array $arr = array(1="one",2="two",3="three"). well
foreach($arr as $key){echo $key; /*this will output one two three
*/ }
LOL
why ?
try to read the doc on the php.net .... maybe you will
understand better
if you don't understand from us
read what alecs wrote
I'm might be better off looking up a tutorial, I don't see
what foreach is supposed to do in relation to for, which is what I
need a for statement for arrays to increment the key.
bluefusion1, foreach doesn't require you to know how big the
array is.
you don't want to read the array .... you just want to add a key
at the end ?
I want to increment it as long as the condition is
active
bluefusion1, what exactly are you trying to do?
while ($your cond ) {$array[count($array)] = $some_value}
while ($your cond ) {$array[count($array)] = $some_value}
bluefusion1: you first must DECLARE $array = array();
uwhile ($your cond ) {$array[count($array)] = $some_value}
bluefusion1: you first must DECLARE $array = array();/u
right.... mea culpa ..
is 2.36 Am here
know that feeling
use foreach if you want all elements - still use foreach if
you wanna break the loop when you detect a special condition for a
VALUE (for Fser) - and for if you have an array indexed with
integer KEY's (for Fser) and you are not looking at all elements of
the array.
thanks
Hello
hi
lo
Whats the command to generate a $_GET string?
There is no row.
a url
I recall there was a command to generate a $_GET string out
of an array
uI recall there was a command to generate a $_GET string out of an
array/u
http_build_query() ?
ah - always forget about that one
first time is harder ....
i didn't knew it ...
garotosopa, the SQL is fine, the data being used is fine,
prepare, bind and execute all go fine (no exception is
thrown)
garotosopa - yup, thats it. thanks
error_reporting(E_ALL) ?? are you using mysql ?
yep
Thanks guys for your help. I went out on the edge, but
surprisingly php works
yep, yep ? or yep, no
coders are gods
alecs, yep to both
lig, are you using PDO::ERRMODE_EXCEPTION ?
try to put after mysql_connect() or die(mysql_error())
mysql_select_db() or die(mysql_error()) mysql_query() or
die(...)
Hm - I didn't...
thanks garotosopa
how do people here like drupal?
alecs, usign PDO
okay apparently i'm segfaulting my apache processes left and
right, and i've narrowed it down to one piece of code ( http://pastebin.ca/562968 )
ok
only problem is, i don't know what's wrong
can anyone see the [simple] thing i'm overlooking?
Ahh
are you using PEAR DB?
Mr_Grim, no, my own class and mysqli. i can paste the whole
class if you need
maybe here "while ( $row = $query-fetch_object() ) { $rows[]
= $row; }" ... ??
Sounds scandalous
alecs, yeah, i *think* that's where the problem is
no thats okay
only trouble, nothing looks wrong to me
Pollita, shh - my dirty little secret
1 || !$return_one ) { to && instead of ||, it's
fine
but now that i have more than one row, it segfaults
i have not got php to segfault for a while
i remember the xml bugs from php 4
lig, o() returns an instance of the class
it's complicated
intersting method name
$array = object .... fetch_object retrun $ob-row1 ob-ro2
it would be less complicated if it was getInstance(). you'd have
to type more tho.
it would be less complicated if it was getInstance(). you'd have
to type more tho.
garotosopa, yeah, originally it was instance()
use ZEnd
alecs, ?
*** zend studio
function () { /* do stuff */ }
that's almost the same code from http://us2.php.net/manual/en/function.mysqli-fetch-object.php
Now, "where's the function name?" I hear you ask.
Simple.
lambda?
It's a zero-width-space character
oh
heh
so just ()?
thats gotta be confusing
No, no, you forgot to type
Pollita, so anonymous functions made it in? wez got
them?
No, I was making a unicode joke
It fell flat sadly
:PPPPP
sooo... what can i do about my issue?
dang you woman
http://www.fileformat.info/info/unicode/char/200b/index.htm
zwsp
Pollita, you have been playing too deep in the unicode
darlin
I use that in anti-spam measures when posting my email
address on webpages....
foo@example.com
Looks fine to the user, but is dugly to a bot
fugly too
str_replace( '', '', $str )
rob1n, has $query-fetch_object() ever worked before with
multiple rows?
garotosopa, it isn't now apparently
Only works for spammers which are that smart
hehe
well spammers use ocr now anyway -_-
and maybe worth reading the spam from...
rob1n, I wonder if -fetch_object returns false whe there are
no more rows
garotosopa, so wouldn't it then exit the loop?
Anyway, there are pleanty of other code points, plus several
ways to encode the same one
rob1n, I had never had a segfault because of this thow
garotosopa, yeah, same -- i can't see why it would
segfault
Pollita, I thought only PDO::query had the problems with
unbuffered queries.. execute does as well?
== == \xE2\x80\x8B == \xF0\x82\x80\x8B
rob1n, I usually get it when I silly things like public
function foo(){ return $this-foo(); }
PDO::query() has no place in select statements, but yes
PDOStatement::execute() does have unbuffered issues
hm
garotosopa, okay, thanks for the help, i'll take a walk then
try again
heh i just got an infinite loop
Yay! Those are so fun.
Pollita, closeCursor will clean things up - like with qyery?
BigE darlin
Should, yes
Hey lig
been a while since I saw you in here
Yeah, I kinda took a brake for a while... I guess...
Hi. I need some help please.
Then ask a question...
This is working fine linux but its not working on the windows
2003 server mail($ToEmail, $EmailSubject, $MESSAGE_BODY,
$mailheader) or die ("Failure");
Check http://php.net/mail for
settings on Windows servers. It won't work out of the box because
you have to setup a smtp server.
I have it setup in the php.ini
Then you should check your e-mail server for possible
errors.
if i have in an string {unu.tpl}some text{doi.tpl}... how can i
extract the names of the files unu.tpl and doi.tpl ?
ptaylor2, does the script die() there?
I am not sure.
does it say Failture?
Let me check something. Brb
Its not connecting to the smtp mail server.
what are the form enctypes for, I never even use them
mail() [function.mail]: SMTP server response: 550 Sender
address must be specified. in
CInetpub\web\users\taylorassociate.com\test.php on line 11
Failure
ptaylor2, configure mail_from (or something like this) in
php.ini or specify the From: header in your message
It's connecting, you just need to make it send a "From" header,
that's what the message is telling you.
sendmail_from = mailer@taylorassociate.com \r\n\
SMTP = localhost
smtp_port = 25
any of you guys use zend framework?
I've never setup a windows server... but I don't think you
need the \r\n after it.
At least, not in the php.ini.
I am using otrs with it and its has proccessed over 1,000
email messages with no problems and it uses the php.ini
does anyone know what kind of search php uses for associative
arrays
woot
trying to find a way to create applications faster, like
online stores, and etc
trying to think of a good framewokr
lorph, clarify
d-media, each has pro's and cons. investigate and see which
fills your requirements
oh - and I am currently using ZF
or at least parts of it
Is that line missing the mailfrom?
For some strange reason Apache is telling me that my
php5apache2.dll does not exist yet I did a direct path to it and
double checked it.
anyone here familiar with regular expressions
somewhat joshfee - the basics - why?
lig does php use a btree to structure the indexes of the
array or what other structure
lorph, you talking about internally? you need to talk to
Pollita for that.
well, I'm trying to backreference a subpattern, but i dont
want that subpattern to show up in the resulting array
hash table
Mix of linked lists and vectors
ok did i miss anything i got disconnected
nope
nothing
joshfee, you are out of my realm
lol
joshfee, If you use ?: in the subgroup this will not appear
in the resulting array, but I guess that it couldn't be used as
backreferences either. try in #regex
thanks, I'll try there. I'm using ?: in the subgroups I don't
need, but if i use it in this subgroup then I can't backreference
it
precisely.
whats the name of the function to find the 1st accurance of a
string?
SunShineLady, its position? http://php.net/strpos
thanks
what have you got under your bonnet? http://www.moonet.co.uk/bench.txt,
http://www.moonet.co.uk/bench.php
anyone have a simple example of some php that would parse XML
and echo to html?
I fixed the problem.
I switched the smtp in the php.ini to real server linux.
congrats... not sure what the original problem was, but congrats
anyway!
It does not like the windows server for some reason.
Windows sucks
yeah, but i could never live on linux
jk
emulation isnt good enough, and I need photoshop and flash
and.... adobe in general
i want a tri-booting iMac
windows, linux, and OSX
Are you using Max?
Are you using Mac?
no
PC
Ok
if OSX ran native on x64
then id dual boot it
I have a basic compilter that will compile applications on
windows, linux and Mac.
in what language?
oh
BASIC
Did you load Mac os on pc?
lol
i want to, but my hardware is unstable for that
Its realbasic and it compiles the application to 100% binary
code.
not even assembly?
that doesnt sound right
The applications run fast as hell.
is it OS? send me a link
I don't believe it
The link the for the compiler?
yes
is it OS?
http://www.realsoftware.com
Its the compiler.
lol
its not OS. damn
I wonder how much it would cost to buy the mac os?
for intel?
you can't buy it, it was a leak
what makes you under the impression that it compiles to pure
binary?
That is what the company told me.
are you sure they didnt say it "compiles it to a
binary"?
Yes
it really doesnt work like that
lol
does anyone have a working example of simpleXML?
It runs a lot faster then you think it does compared to
applications compiled using Vb.Net 2003.
is there anyway to link to a php file as a downloadable
file?
change its .php to .html or something?
you need to write a php script
me?
no, Adam
is there a way to include\require files reletive to the file
its included\required from?
that's the default behaviour
AdamB0122, readfile with the proper headers I would
assume
depth3). in order to include depth3 from depth2 i need to
navigate like its depth1 cause thats the top level
i see
is there a workarround?
yes
i wrote a thing on it, but blew up the webserver it was on
gimme a sec, and i'll get it for you
anyway, the idea is that you define a constant to contain the base
directory your code is in, and include based on that
I thought of that but its impossible to nav upwards
(../../../)
http://f00li5h.pin21.com/php_include_paths.html
it is not impossible
"Do you have deja vus sometimes, Mrs Lancaster?" - "I don't
think so, but I could ask in the kitchen."
"Ground Hog Day", yes?
hey, im using php-5.2.3 compiled with oci8 support.. i've PHP
that uses DB.php (MDB2 pear extension) to connect with Oracle, but
I got problems with DSN, anyone here have any expiriencie with
PHP+Oracle?
what function should I use for symply deleting a file?
unlink?
__ed_, thanks
np
Oh... in case the animal is written in two words... yes. :/
"Do you sometimes have deja vus, Mrs Lancaster?" - "I don't
think so, but I could ask in the kitchen." 3
Sorry, no it's one word like you wrote it, I didn't see your
comment prior to the quote though
Disregard me
*grml* @ repost. :
can you have more than 1 char in explode()
Of course.
iok
like
explode($text, '')
The manual says that the type is string.
And it doesn't state otherweise.
So any string is acceptable.
f00li5h - Thats little not what I expected, I guess Ill work
with a base-root constant. Thanks anyway
great, as long as we're happy
that was for you, ofcourse.
Just tried to make any sense of it.
Pretty hard while listening to Groundhog Day.
hey I want to be able to include files w/ the prefex
http
i'm using a white background on my terminal (a black one
makes the screen twitch -_-) the nick was in yellow, so i could
hardly read it
xchat? :]
I have the current string to put infront of the directory
liste when includign a file
but still no work
irssi
Oh. k.
xchat sucks. _
"SunShineLady" is much longer than "SlashLife", though. :/
how would I allow includes through HTTP
why do you want to do that?
Take a look at php.net/readfile... this might be what you're
ACTUALLY looking for.
k thnx
and hoped it'd hit the right person
i should do a bot that learns answers, then gives out 8ball type
answers to ambiguious questions
Yeah... I had that problem as well...
And I'm completing after typing three characters.
how would I retrieve the arrays 1+
I just don't want array 0
like $array[0] I don't want, i want $array[1] $array[2] $array[3]
etc
Pc_Dark - assign $array[1] manualy and it will be the base
index
anyone know how i can find out which named anchor a user
entered a page with? eg the person navigates to script.php#section2
-- i want to get the string "section2" in php somehow
banyone know how i can find out which named anchor a user entered a
page with? eg the person navigates to script.php#section2 -- i want
to get the string "section2" in php somehow/b
when building php, do i have to do it on a server running mysql
to get mysql support?
i was hoping to have a seperate build server to the production
servers.
# is all done at the client side - no server involved
that's incredibly inconvenient
thanks though
i'll try doing it the other way around maybe
maybe AJAX - get messy with javascript ?
i'll tell you basically what i'm doing
i have some javascript which changes which div on the page is
visible using named anchors. it allows me to enter on any "page"
too. but depending on the entry page i want to pass a variable to a
little flash menu when it loads
oh i'm so stupid
i'm using swfobject, which loads the flash with javascript
anyway
i can check the named anchor there
d'oh
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=1945939278
how would i write a regex that gets those last few numbers from
it?
anyone know
When serializeing/unserializeing and storing in a mysql db i'm
having problems. it serializes and gets into the db but when i try
to get it back out it won't unserialize. stored in bd as
a:7:{s:11:"JOBFUNCTION";s:7:"Lending";s:11:"JOBLOCATION";s:8:"Stilwell";s:7:"JOBTYPE";s:11:"Supervisory";i:83;s:10:"This
is 83";i:84;s:10:"This is 84";i:85;s:62:"this is a control test
with ' and " maybe ~ and ` OR `` ''";i:86;s:10:"this is
86";}
Database normalization... -_-
"jobfunction", "joblocation", "jobtype"?
Slashlife there is plenty of php and mysql examples on
google.com
Your point being?
it's part of a survey
You use those examples to solve your problem.
How would those examples help me getting rid of DragonDs stupid
serialized array in his DB?
Did you try google
Heck, are you completely stupid?
I'm *NOT* having a problem.
No its no because you did not try
*DRAGOND* is the one who has.
Ok
It sound like your having a problem because it question that
your asking in the channel.
I clearly addressed him directly before. And I used exactly
the names he used.
he just wants love from u, SlashLife, don't treat him like
that
In english terms this sounds like a question i'm having
problems
Your semantics is bjørked then.
I ignore idiots
i used to, but then i ran out of people to make fun
of.
haiku can be fun
but sometimes it makes no sense
refrigerator
back to my problem i don't want to have to change the columes
every time the survey changes. from what i said before it seems
like the quotes are messing it up. it gets into the database fine
but when i do the query to get it back out simething goes wrong.
any ideas?
hi - how do i get the absolute path of my root folder? im trying
$_SERVER['DOCUMENT_ROOT'] but this doesn't want to work on my local
environment ie: its returning the Eworkspace\htdocs instead of
http://localhost/mywebsite/
My fault wrong user.
i need index.php files in subfolder of my website to
reference the same css file found at
root-folder/css/styles.css
tag
any help would be appreciated
http://www.php.net/manual/en/function.getcwd.php
thanks
i was just thinking i could even hardcode the url
but would this slow things down?
instead of looking internally for the file it might have to make
an additional call to the nameserver to resolve the url
I believe someone did a benchmark which showed relative paths
were faster in php5
so getcwd should be quicker then
ah seems ill have to specify the path separator too
Mmm, well, I'd use '../file.css', personally.
i cant do that for my index.php in subfolders on the same
site
because they'll only go one folder up and find nothing
and all my index.php files (from various subfolders) are
importing the same header/footer
hence my predicament :P
Right, but depending on where your css file is located you
can probably set up a single common css file location.
For example, ../../skins/common.css
its at root/css/style.css
so root/index.php finds it at css/style.css, and
root/subfolder/index.php finds it at ../css/style.css etc
So... depending on the level down to the index.php... okay,
so getcwd and find out how many levels there are.