473,554 Members | 3,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP Forum

PHP web programming language - Ask questions about php scripting, databases, mysql, templates, PEAR, php functions, PHP-GTK, setup and installation, object oriented programming, classes, files, security, sessions, arrays and more.
0
2,600
thread by: Andrew Crowe | last post Jul 16 '05 by: Andrew Crowe
Hi guys, I've come across a rather strange, and very anoying problem. On /some/ PHP sites that we're developing on 2 different servers, files that are in the root of the website are unable to load files using relative paths (they need to be given the full "C:\Inetpub\wwwroot\website\www\folder\file.txt" rather then "folder/file.txt")....
0
5,018
thread by: Fred | last post Jul 16 '05 by: Fred
Hi, How can i test if a name is valid for a domain name ? I don't know how to write such a regular expression.. Thanks for your help Regards, Fred
2
2,987
thread by: Sugapablo | last post Jul 16 '05 by: P'tit Marcel
My brain is frozen on a convenient way to figure out if today is the 1st, 2nd, 3rd, 4th, or last Thursday of the month. Basically I need something that will figure this out for any given day for any given month. date() has everything BUT a 0-5 return for this. -- Sugapablo - russpghREMOVE@stargate.net http://www.sugapablo.com | ICQ:...
0
3,429
thread by: Margaret MacDonald | last post Jul 16 '05 by: Margaret MacDonald
Has anyone already solved the not-enough-information problem when using the -l (lint) switch to check syntax? I make heavy use of include(), so when php complains about some syntax problem, the line number it reports is never even close to correct. And since even the lint switch doesn't cause the alleged offending line to be written out,...
0
3,560
thread by: Robert Freund | last post Jul 16 '05 by: Robert Freund
I've been looking for a good and free code beautifier that runs on linux. About the only ones I found where Trita (www.trita.com), which costs money and only runs on windows. The other one was Beautify PHP (www.bierkandt.org/beautify) which does not offer all the features I'd like to have. I'm also more interested in something that is not...
3
6,749
thread by: Curious Expatriate | last post Jul 16 '05 by: Justin Koivisto
Hi- I'm completely stumped. I'm trying to write some code that will parse a file and rewrite it with all URLs replaced by something else. For example: if the file looks like this: <b>click here</b><a href="http://www.cnn.com">click me</a> ... then the output should be this:
3
23,545
thread by: Sandwick | last post Jul 16 '05 by: Shawn Wilson
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a...
1
6,252
thread by: JS Bangs | last post Jul 16 '05 by: André Nęss
I started using PHP's object-oriented stuff a little while ago, which has mostly been a joy. However, I've noticed that they don't seem to echo as I would like. Eg: $this->field = 255; $this->key = 'id'; echo "$this->key is $this->field"; // prints "id is Array" // Thus I am forced to do this $keyval = $this->field;
1
3,114
thread by: Jeff Blume | last post Jul 16 '05 by: sam
is there a way i can count the number of files in a server side directory using php? i'm not sure if this sort of thing is possible at all (i'm new to php) but would appreciate any tips or scripts anyone could point me to. thanks a bunch, jb
0
2,529
thread by: eric | last post Jul 16 '05 by: eric
Greetings! I've installed Apache 2.0.xx and PHP 4.3.2. I want to use Ming as a module to PHP. The instructions that came with Ming say to: as a php module (unix) download php_ming.so.gz uncompress it and copy it to your php modules directory (you can find your php module directory by running php-config --extension-dir)
1
4,056
thread by: fartsniff | last post Jul 16 '05 by: Jason Dumler
i found this code out in the ng, and its seems long and clunky, i am still experimenting with preg_match and _replace, but the syntax is a bit confusing. it seems i always misplace or mistype something. this is the code that i am trying to replace with better, optimized code. i would like to make a preg_match and then preg_replace for this,...
1
2,500
thread by: Daniel Doman | last post Jul 16 '05 by: Daniel Doman
I have a string that I $_get' from the query string lets say that it is "The Hallie's" The entire Query string looks like this: $_SERVER == op=The%20Hailie%27s (I edited out other params)
2
5,282
thread by: JW | last post Jul 16 '05 by: JW
I wanted have this as part of a flood control script: <? echo ("Flood control in place - please wait " . $floodinterval . " seconds between postings."); sleep(5); // go back two pages echo "<script>window.history.go(-2);</script>"; exit; ?>
1
10,740
thread by: ratlhead | last post Jul 16 '05 by: Mike Blamires
Hi all, Because of a chroot jail a web site that I'm working on is in (I don't know much about the jail stuff), I can't use sendmail to send email through a PHP script. The sys admin said he's put a copy of the basic unix mail into the jail that I can use. Now I assume I can use this by just doing a shell_exec, but for some reason, I...
0
2,021
thread by: Susanne Klemm | last post Jul 16 '05 by: Susanne Klemm
Hello! I am working with the XML-DOM-Extension. I want to change the content of a variable in a XSL-Document. The following testscript works well. $dom = domxml_open_file(getcwd()."/einzelnes_item.xsl") $elements = $dom->get_elements_by_tagname("table") echo count($elements)." Elements<br/>"; for ($i=0;$i<count($elements);$i++)
0
2,473
thread by: Rutger Claes | last post Jul 16 '05 by: Rutger Claes
I'm starting a new project, and I was wondering what is considered best practise in the following cases: * Connecting to multiple databases using the PEAR library. * Triggering your archive script from within the project without cron on the server It doesn't looks right to start archiving each time a user visits a page. * ...
1
2,787
thread by: lawrence | last post Jul 16 '05 by: Bruno Desthuilliers
This has nothing to do with PHP, but I ask it here since I do most of my programming in PHP. What do you think the best book on design patterns is? The book can be written for C or Java or in the abstract. What was useful to you and why?
1
2,341
thread by: ShishCoBob | last post Jul 16 '05 by: David Robley
I'm currently using PHP Super Counter from: http://www.abspoel.com/roel-karin/download.php My biggest problem is that each time this script runs (aka has a count) it makes a query to an extreme big table (created by it) and sucks up a lot of processing power. Well today my mySQL server has been stuttering because of high traffic. Every...
5
3,626
thread by: Jamie Wright | last post Jul 16 '05 by: Shawn Wilson
I have a problem with an HTML form. I have a form which I want to be able to type basic HTML code into it. When the submit button is selected the data is then previewed and added back into the text box again. Unfortunately all of the " charachters are escaped (I think that is the correct term) ie they have a leading \ added. This is causing me...
2
2,366
thread by: Topspin | last post Jul 16 '05 by: Shawn Wilson
I'm running PHP on Windows, but that's just the local test... in production it will be on Apache. I am not using PHP as a CGI. I want to perform redirection of the user's browser if the user isn't a valid user. I don't want to use the refresh meta tag or javascript to do this. I want to do this with some sort of server command. Does...
2
51,383
thread by: sky2070 | last post Jul 16 '05 by: Korthrun McBloodlust
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ')' in c:\inetpub\wwwroot\session.php on line 19 can anyone tell me what is wrong with this code??? <? // Define the Session class class Session { // Define the properties:
2
3,331
thread by: Frans Schmidt | last post Jul 16 '05 by: Korthrun McBloodlust
I want to make a new database with several tables, so I did the following: <?php CREATE DATABASE bedrijf; CREATE TABLE werknemers (voornaam varchar(15), achternaam varchar(20), leeftijd tinyint(3), adres varchar(30), woonplaats varchar(20),
0
2,227
thread by: zelnaga | last post Jul 16 '05 by: zelnaga
i'm connecting to the internet via a proxy, and am having problems filling out forms... below is the code i have, and below that is the http request i am trying to make it look like. they look the same to me, but it isn't working, so i guess they aren't... $proxy = fsockopen("tcp://someaddresshere", 80, $errno, $errstr); $temp =...
0
1,788
thread by: dmassie | last post Jul 16 '05 by: dmassie
is there anyway to increase the maximum size of the data part of: xml_set_character_data_handler(parser,data) since I've been told that it is set to 1024. Thanks Daniel
8
12,663
thread by: Steve Fitzgerald | last post Jul 16 '05 by: Cl1mh4224rd
The below login script does work. The form does not seem to be submitting. I keep getting the username and password fields. The only errors I get are notices that email and password and undefined indexes. Here's the login script: <?php session_start(); // includes

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.