I'm just barely beginning... but I have tried to research this...
As per instructions in the class I'm taking I set up several php library
folders outside of public_html, one of which is
../phplib/utilities/
and inside that folder I've put a file scandir.php containing the
function called
Barefoot wines got sued by the French maker of Chateu la fite for their
Chateu la feet and Barefoot lost. Amazing but that's the precedent that
comes to mind.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
as an
apache mod in an .htaccess file.
I had luck with the include approach:
include 'c:/_Paul/web/phplib/utilities/dirfile.php';
echo scandir();
I guess it'd be more wise to put in my php.ini to save a lot of trouble.
Thanks!
Paul Furman wrote:
I'm just barely beginning... but I
John W. Holmes wrote:
snipped a bit
As for your php.ini, you put a path for include files that PHP will look
in by default. So if you put 'c:/_Paul/web/phplib/utilities' as an
include path, you'll be able to just use include 'dirfile.php'; instead
of giving the complete path.
I added this line
Paul Furman wrote:
I added this line to my php.ini without luck:
include_path = 'c:/_Paul/web/phplib/utilities'
PS I also tried it with backslashes instead of forward-slashes.
Inside php code that doesn't matter (or at least it works) on my windows
machine but the php.ini does ask that you follow
Solved again, double quotes needed!
include_path = c:\_Paul\web\phplib\utilities
include_path = 'c:/_Paul/web/phplib/utilities'
PS I also tried it with backslashes instead of forward-slashes.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It doesn't matter what I name my files apparently, I don't need any
extension or anything once I get the first script going and that can be
index.php, index.htm or anything if I pont to it specifically. To me it
makes sense to call them xx.php 'cause I'm on a windows machine it's
just
I'm new so probably missing something easy or doing something terribly
wrong but I have spent a lot of time experimenting...
?php
$dirstr= ./
include 'scandir.php';
scandir('$dirstr');
?
parse error, unexpected T_INCLUDE in [the above file]
if I comment out the
$dirstr= ./
above that
David Obrien wrote:
the \ has to be slashed
.\\;
Ah great, thanks! that fixes most of the errors. The following runs
where I define the $dirstr in the function but if I try to define it in
the page that calls the function, it still gives
Parse error, unexpected T_INCLUDE in [#call]
#call
Paul Furman wrote:
PS I'm on my windows apache server but the forward slash seems to work
OK actually, it was the back slash that was causing problems, it only
works with a forward slash!
but... I've still got the include error:
???
Parse error, unexpected T_INCLUDE
#call
$dirstr
Shawn McKenzie wrote:
I've noticed in both of your posts that you aren't terminating the line
before the include with a ;
Yup, thanks!
Then I fixed my global problem without bugging you guys too.
Final result:
#call.php
$dirstr= ./;
include 'scandir.php';
scandir('$dirstr');
#scandir.php
I'm beginning to learn PHP to rebuild my web site in such a way that I
can update it more easily (...and add some other dynamic features ...and
utilize a database). I like the idea of a simple directory structure and
it's a sensible way to organize my various projects and topics. So what
I
The php installer doesn't do everything for a windows installation.
You'll need to edit php.ini httpd.config for apache, as described in
the installation guide.
Raditha Dissanayake wrote:
Yes sounds like you have not read the installation guide.
Mark Mark wrote:
I am running Apache 1.3.29
doesn't need to be so complicated and looks exactly how I
want it to... maybe still possible... we shall see.
Paul Furman wrote:
I'm beginning to learn PHP to rebuild my web site in such a way that I
can update it more easily (...and add some other dynamic features ...and
utilize a database). I like
Jason Wong wrote:
manual imagejpeg() siblings
You could take a look at the source code for gallery for more ideas.
Google gallery php or something like that.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Totally ignorant need for clarification... Should I set up a counter for
loops $integer++ or if I'm going through something, the while function
knows to just go through those and fills in array numbers accordingly?
Below is my project (while loop at the bottom):
I'm getting unexpected $end on
Eric Gorr wrote:
the while function knows to just go through those and fills in array
numbers accordingly?
The while function has nothing to do with it. Using the syntax $array[]
simply adds an element onto the _end_ of the array and PHP picks the
next logical, numerical index.
OK thanks
OK thanks again for helping through the stumbling blocks... I'm rolling
again now.
John W. Holmes wrote:
Just make sure $pictures is defined as an array before you try to push a
value onto it (even using the method you have now), otherwise you'll get a
warning.
It seems to be working fine this
What is this:
?php
$result= (1 * 10);
print$result
?
10
there is a 10 in the end of that
Again, I very new to this, first time I tried doing a little simple
math, I'm befuddled.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Chris W. Parker wrote:
Paul Furman wrote:
10
I'm befuddled.
What other code is in that page?
That was the whole page but it's being included from a template. When I
made the test math file empty:
?php
?
I still got the funny characters but not with any other pages I include
10
Chris W. Parker wrote:
What happens if you make test.php completely blank inside? I'm talking no ?php ? or anything.
Totally empty still produces the strange characters. I also had a big
complex page and printing some math in that produced the characters.
...
AH, OK, it was this code
Single quote everything should work.
Jake McHenry wrote:
Hi everyone. I'm outputing payroll information to an excel csv file, and when anyone get's paid over 1k, the amount is split into two fields because of the comma in the amount. Is there anyway I can tell excel that this particular comma is
Jake McHenry wrote:
That just filled my spreadsh**t with quotes around everything... still the
amounts larger than 1k are in 2 columns..
did I do something wrong?
Sorry it didn't work. Maybe double quotes? I've output data from MS
Access that came out smothered in quotes and when importing
This PHP stuff is too cool!
Thanks for getting me over the hump folks.
Here's my work in progress:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=ecards.php
Only the 'next' button works for now but still I'm darn impressed with
myself g. This will work on any folder of pictures with a subfolder
Paul Furman wrote:
This PHP stuff is too cool!
Thanks for getting me over the hump folks.
Here's my work in progress:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=ecards.php
Only the 'next' button works for now...
...Of course I'll want to be able to click each thumbnail
to bring
Does this mean I need to recompile from source code?
(seems an extreme measure to me but what do I know)
Is that difficult to do on a windows machine? I see it in some phpinfo's
out there like this: http://www.php.net/~jimw/info.php but that's not in
mine or at school or most hosting companies
Thanks. I could have sworn I searched php.ini for exif. I had to do both
of the below to make it work.
Ben Ramsey wrote:
php.ini
[extension_dir = c:\PHP\extensions]
[uncomment]
extension=php_exif.dll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
.htaccess file on the server maybe?
I'm not at all sure though you might not want to reload the page
*every* time it's visited.
Ryan A wrote:
Hey,
Have run into a little problem...any help appreciated.
Heres what I am doing:
I give the client a control panel where he can add,edit and delete
If you start with one index.php then use that to include additional
files, it should accept any file, even with no extension. At least it
works that way for me.
E . H . Terwiel wrote:
My PHP system demands that files to be interpreted by PHP MUST have
the .php extension.
If I have an .html
Why am I getting the error Undefined index: comment?
It's probably a typo because I had something similar that worked.
form action=?php include (ACTION_DIR./jpeg-comment.php); ?
method=post
textarea name=comment ROWS=6 COLS=60
?php print $comments[$thumb_num] ?
/textareabr
, this is all new to me. I never used form action= before,
especially not with PHP. php.net assumes I know all this g.
Paul Furman wrote:
Why am I getting the error Undefined index: comment?
It's probably a typo because I had something similar that worked.
form action=?php include (ACTION_DIR./jpeg
Adam Bregenzer wrote:
Also perhaps related, when I call $_POST[comment] in the action file,
it gives me Forbidden You don't have permission to access...[error
message] but this is my own server at home. I'm quite unfamiliar with
forms (and new to PHP for that matter).
That looks like an
Paul Furman wrote:
Adam Bregenzer wrote:
Make sure the
directory this file is in is accessible from the web.
No, it's not accessible from the web, it's in my protected php_library
outside public_html.
It does load the protected action file as long as I don't try to call
$_POST[comment
Adam Bregenzer wrote:
Should I make a little php action file in public_html
that includes the actual file?
yes
OK thanks, I made this:
?php
# jpeg-comment-public.php
include (C:/_Paul/web/phplib/action/jpeg-comment.php);
?
but now the hidden one isn't aware of any variables.
Forbidden
You
Adam Bregenzer wrote:
You will not have access to the $_POST[comment] variable until the
form is submitted.
Understood. That debug test only worked after submitting the form.
So maybe the better way is to just submit the form with the action file
simply reloading the main page to refresh it
OK, this is what I've done and it seems to work:
Paul Furman wrote:
So maybe the better way is to just submit the form with the action file
simply reloading the main page to refresh it then put my code below with
an if statement checking if the form has been submitted yet and clearing
$_POST
Jochem Maas wrote:
Paul,
the warning that John refers to does occur - whether you see it
depends on the error reporting level, PHP will create the array for you
if you have not already initialized it but a warning will be generated
in such cases. ...
error_reporting = E_ALL
...
Johnt wrote:
function foo() {
static $a;
$a++;
echo $aBR;
unset($a);
}
foo();
foo();
foo();
///
*** RESULT
1
2
3
Should it be all 1's at this time?
Is it the code, function, or my php setup..any idea
When I started looking into this I was told ASP was slow at processing
very large databases (and I think also large numbers of users) but I
don't think this becomes a problem unless the site is extremely large or
gets an awful lot of traffic.
Merlin wrote:
Hi there,
I do have a performance
My background is only with MS Access where everything is drag drop. In
that case you can link fields and they will populate automatically. If
you have Access, it might be an easier way to set up the database, enter
the data and then export it to MySQL or whatever.
Sajid wrote:
I am not aware
Chris W. Parker wrote:
Chris W. Parker
on Wednesday, February 11, 2004 11:45 AM said:
I think in this is what's called a reference.
Sounds like that's simply a way of making an alias for a variable:
http://us2.php.net/manual/en/language.references.php
--
PHP General Mailing List
Does anyone know of a utility for WRITING or at least reading IPTC data
in images with PHP? I found lots of EXIF utilities and did an
experimental thing with that. PHP even has a built in EXIF reader but
the only IPTC utilities I've found are expensive ActiveX or Delphi
components and I don't
OK this looks like the thing:
http://multipart-mixed.com/photo/iptc.html
It's a perl module. Can I use that in PHP?
Paul Furman wrote:
Does anyone know of a utility for WRITING or at least reading IPTC data
in images with PHP? I found lots of EXIF utilities and did an
experimental thing
Perl module
-undocumented, some serious compatibility problems, improper format
function save( $sOutputFile = null )
$sImageData = @iptcembed($sIPTCBlock, $this-_sFilename, 0);
function output()
@iptcembed($sIPTCBlock, $this-_sFilename, 2);
Paul Furman wrote:
OK this looks
Richard Davey wrote:
Why not set-up a variable in a common include file (something like
$basedir = /usr/home/vinny/public_html/php) and then you can just do
this:
include $basedir/script.php;
Here's what I use:
--
HOME:
--
Jimmy wrote:
...they both charge monthly fees for using
their E-Commerce Tools. Why? I thought it should be a one time thing? Or are
they not providing code, just letting us use the code via Explorer and
Frontpage?
2. If I were to look for a website hoster, any recommendations?
Many open source
table
tr
td style=border:1px solid black; valign=top
topbrtopbrtop
/td
td style=border:1px solid black; rowspan=2
textbrtextbrtextbrtextbrtextbrtextbrtextbr
/td
/tr
tr
td style=border:1px solid black; valign=bottom
bot
/td
/tr
/table
Matt Hedges
I checked the manual but I still don't get it.
http://us2.php.net/manual/en/language.variables.scope.php
I'm setting a variable $pics with a form by post method. It's on a
screen that is included, then it needs to be applied to another
screen that will take it's place when it's all re-processed.
$pics
everywhere. Is that bad?
Paul Furman wrote:
template:
global $pics;
if (!isset($pics)){$pics = 8;}
picture screen:
global $pics;
# works fine with the setting 8 from the template
settings screen:
global $pics;
print $pics
file
which does an include on the template that includes the screens. I set
global in all of those.
Paul Furman wrote:
Help.
After changing $pics on the setting screen, the picture screen will not
recognize the new value.
I'm just not clear where I need to set global (where it's being
to jump the gap but it's
killed in $POST too! I thought $POST was a superglobal. What would make
that lose it's value?
Any ideas?
Paul Furman wrote:
The template wipes it out on the second round through after changing in
settings. Coming into the template the second time it prints out empty.
If I
When I refresh a script using a form, it goes through resets all my
custom Constants but presumably all my variables should still hold their
values from the last run, right? THere are no functions involved.
What would cause a variable or even a $POST[] value to be erased?
--
PHP General
Jay Blanchard wrote:
What would cause a variable or even a $POST[] value to be erased?
[/snip]
Refreshing the script causes the variable arrays to be repopulated with
empty or blank variables unless a session was used to hold the
variables. Refreshing is essentially calling the script without
Paul Furman wrote:
So...
$_REQUEST is the only way to go without getting into sessions?
OK I see, it either goes in the url or a cookie.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jay Blanchard wrote:
[snip]
$_REQUEST is the only way to go without getting into sessions?
[/snip]
Nope, $_REQUEST (as its name implies) contains variables that are part
of the request process. If you refresh the form the $_REQUEST array will
essentially be empty for those vraibles that would
Paul Furman wrote:
OK I'm confused. I want to set a variable with a form. How do I do that?
I guess I need to put it in the url? I did a mail form that worked by
putting stuff in the $POST and when it refreshed to the same mail page,
I grabbed the stuff back out of that (at least that's what I
Matt Matijevich wrote:
snip
I'm guessing this is not a sensible approach.
Every place I construct a url, I'd have to remember to add this.
/snip
Have you looked into sessions and/or cookies?
I'm taking a class we are probably not going there for a while. It
looks involved.
I think you
Ugh, I think I'm done for the day. header() requires output buffering
which would span several files and sounds like another mess.
Paul Furman wrote:
Matt Matijevich wrote:
snip
I'm guessing this is not a sensible approach. Every place I construct
a url, I'd have to remember to add
followup...
Paul Furman wrote:
Ugh, I think I'm done for the day. header() requires output buffering
which would span several files and sounds like another mess.
Well, for now, I set up some of the links to maintain the $pics variable
in the url as a $_REQUEST and circumvented the header
Matt Matijevich wrote:
snip
I want to be able to simply FTP a new movie
onto the server, and then have the menu update itself. possible? I
would also be looking to do something similar with JPGS.
/snip
here is some code to help start you
Here's another example:
(more error checking probably
[EMAIL PROTECTED] wrote:
Have a questions about sessions. In building a simple app do I have to
include the session id in the url string or in a hidden tag? or does it
normally track it by cookies and so I dont have to call it on every page?
thoughts on best way to do this
I'm trying to
problems, improper format
function save( $sOutputFile = null )
$sImageData = @iptcembed($sIPTCBlock, $this-_sFilename, 0);
function output()
@iptcembed($sIPTCBlock, $this-_sFilename, 2);
Paul Furman wrote:
OK this looks like the thing:
http://multipart-mixed.com/photo
Admin wrote:
Here is the code I am using:
$fileHandle = fopen($fileUpload, r);
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);
Warning: fopen(C:\\0-temp\\100_0078.jpg, r) -No such file or
directory in /var/www/testbed/httpdocs/blob/grabfile.php on
Jake McHenry wrote:
it's
for my intranet, figured it might be easier this way instead of
touching every machine. All my machines are either on 98 or XP, which
both will use the same font.
There is such a thing as embedding fonts in a web page. I don't know the
specifics but it exists.
--
PHP
I don't see what's wrong with this if statement:
while ... and ... {
if (($pic_num + 1) = $thumb_num {
$tab = ((($pics * $page) - 1) + $pic_num); }
Error unexpected ; on the last line there.
I added some extra () to make sure I had everything together not two
statements or something odd
Thanks folks, it was the missing paren on the if statement.
if (...{...}
if (...){...}
I'm using PSPad as an editor with syntax highlighting and it works
pretty well but I don't always g.
Paul Furman wrote:
I don't see what's wrong with this if statement:
while ... and ... {
if (($pic_num
Shane Nelson wrote:
Hi Folks
A few days ago on the list I saw someone mention a package that includes
apache, mysql and php for Windows. The one install file included all
these programs. Anyone remember what it was?
I've checked google and searched through my email list but I can't seem
to
I've got a script that lists all the folders on my web space. If the
folder containes a non-php old web page with an index.htm in it I try to
include that index.htm but the links inside there do not realize they
are another folder deep. I've been away from this php stuff for a while
so am
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question. I want to use php to include another html doc in
an existing set of documents. In other words 123.html will use php to
call on abc.html so I can make changes to abc.html and
You need to set up an apache server get that running on your windows
machine in order to run php. Then you go thru IE to view the php script
run it that way.
[EMAIL PROTECTED] wrote:
Yes, I need a sample ( display images with php directly from database )
for reference...
So, can you help
70 matches
Mail list logo