| Is it possible to do this |
|
 |
Index ‹ php-general
|
- Previous
- 2
- CSV importWhen using something like this:
LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\r\n'
How do I also insert a field not in the CSV. For example there are 8 fields
in the CSV and 9 in the table. I want the ninth field to be the name of the
CSV file. How do I do this? Can't find any mention of it on mysql.com.
John
- 2
- Newbee: Array Field Separator: \035Hi,
I am reading an already created gdbm file with dba_fetch into an array.
I am able to print out the array but not the individual
elements. The elements are separated with ascii \035.
How would I be able to reference each element based
on the field separator they have?
Also, Once I open the gdbm file do I have to stick with dba_*
calls or are there other function I can use to process the data?
Thanks,
Jeff
- 3
- Print mysql errorsHow do you print the error message sent back from MySQL?
$resultCC = mysql_query($queryCC) or die("???");
J.
- 4
- Simple quote with variable questionI am trying to find the documentation on how and why "id" is quoted in
the first example, but not in the second.
.............elseif($_GET['id'] == 'pro')............
............."http://www.xxx.xxx.edu/~xxx/app_upd_2.php?id=
$_GET[id]&key=$_GET[key]";............
I found this, but it doesnt really tell me why the first id HAS to
have single qoutes and the second CAN'T:
When a string is specified in double quotes or with heredoc, variables
are parsed within it.
I'm just looking for the official explanation.
Thanks
Mike
- 4
- Stumped with select functionI have a function that creates a select list:
function make_select_ns($name,$array,$persist){
$string = "<select name=\"$name\">";
$string .="<option selected>" . ucfirst($name) . "</option>\n";
if ($name == $array[0]){array_shift($array);} //removes duplicate when
table name equals 1st item in array
foreach ($array AS $value) {
if (($value == $persist) && is_string($persist)){$selected =
"selected";}
else {$selected = "";}
$string .= "<option $selected value='" .
str_pad($value,2,"0",STR_PAD_LEFT) . "'>$value</option>\n";
}
$string.="</select>";
print $string;
}
I have arrays for Months, Days, Years, Hours, and Minutes.
All of the arrays work as expected except for the minutes array which
starts at 0 and goes to 55 in increments of 5. Whenever this loads
after a post the value 0 is selected. What am I missing here? Why
does the zero seem to be causing me problems?
Let me know if you need more information.
Thanks,
-Mark
- 6
- user running PHPHi,
I've got an Apache 2 setup with PHP 4.3.4 running many virtual hosts. Each
user has a virtual host of his own, and many use php. I've set
SuexecUserGroup to the username and group of the individual user, yet
running phpinfo() as that user reveals under section apache2handler that
it runs as user "www" and group "www" rather than the user and group I set
with SuexecUserGroup. Why is that, and how can I make it use the user and
group the user belongs to? People are starting to complain that they have
problems using fopen() and the like.
Cheers
Niklas Saers
- 6
- Feedback Email setupHello all
I am trying to setup a feedback form on my webpage using some script
provided by my ISP. I really don't know a lot about PHP and it's syntax
etc.
The feedback form only has 4 fields. These are UserName, UserEmail,
UserCountry & Comments. It works well with all of those fields
appearing in the body of an email that is sent to me. What I would now
like is for the UserEmail field to appear in the "From:" field in the
header rather than only in the body of the email.
There is a line in the script that says:-
$header .= "From: Web Form <email***@***.com>\n";
I suspect I need to somehow place the UserEmail string in here somehow
but I don't know how to do it. Is it possible to do what I want?
Here is the script of the formmail.php file I am using. I have inserted
my email address at the point where it says to and I have created a
"confirm.htm" webpage.
<?
# Adam Internet PHP Form Mailer v1.3
# By John Edwards, Copyright September 2005.
# Mail all variables to:
$to='email***@***.com'; ###I have inserted my email address
here ####
$domain = 'yourbusiness.com.au'; ### I don't have a business domain
name ####
while(list($key,$val) = each($HTTP_POST_VARS))
{
$val = str_replace(chr(10),"",$val);
$val = str_replace(chr(13),"",$val);
$formmessage .= "$key = $val\n";
}
if(
$formmessage # If we have content
&& 'POST' == $_SERVER['REQUEST_METHOD'] # If the message is being
posted
&& strstr(strtolower($_SERVER['HTTP_USER_AGENT']),'mozilla') # If the
user agent contains mozilla
&& strstr($_SERVER['HTTP_REFERER'], $domain) # If the referrer is us
&& !strstr($formmessage,"Content-Type") # Don't send XSS attempt
)
{
# Message is ok!
}
else
{
die("This request looked like a XSS attempt. Stopped");
}
# Reset the From: address for a neater look
$header .= "From: Web Form <email***@***.com>\n";
# If there's an email element, use it for reply-to
if ($email)
{
$header .= "Reply-To: $email\n";
}
# Log the IP Address of the sender.
if($HTTP_X_FORWARDED_FOR)
{
$header .= "X-Originating-IP: $HTTP_X_FORWARDED_FOR via
$REMOTE_ADDR\n";
}
else
{
$header .= "X-Originating-IP: $REMOTE_ADDR\n";
}
mail($to,"Web Form Details",$formmessage,$header);
header("Location: confirm.htm"); ## I have inserted the full URL for my
confirm page here ##
?>
- 6
- Fread and multiple packetsHello,
I'm trying to read from a webpage using fread. The webpage contains a
list of data I need to parse into my administration.
I get some data after sending a GET request. The problem is that this
data is incomplete.
I used a packet sniffer to find out what my normal browser did and
found that the result is sent to me in multiple packets.
The question: how can I receive the other packets?
The code I use for receiving the data:
Code:
$data="";
while (!feof($fp)) {
$data.= fread($fp, 4096);
}
- 6
- Window's property resets on refresh!? can it be preserved???Hi,
In order to preserve some settings and avoid cookies I have thought of the
following trick:
I simply create an array as the property of the window:
window.aList = new Array();
and add the values to be preserved for after refresh.
While I can add the values fine, once I refresh the page the array is reset,
or at least it appears to be!
Any idea how cen I preserve the property of the the window????
TIA,
Tom
- 6
- escapce unvalid charactorsI have a silly question. We know when we add text into database, we
always need to escapce the unvalid charactors.
But why it is not done automatically by database?
- 8
- #40870 [NEW]: Stored proc warning 1329 produces NULL result setFrom: key88sf at gmail dot com
Operating system: Windows Vista
PHP version: 5.2.1
PHP Bug Type: MySQLi related
Bug description: Stored proc warning 1329 produces NULL result set
Description:
------------
I have a simple stored procedure in MySQL 5.x. The proc first does a
SELECT INTO query, followed by a regular SELECT to return it's result set.
The SELECT INTO generates a warning 1329 because no rows were fetched.
However, the final SELECT works properly and returns 1 row.
However, the result returned from mysqli_query() is NULL !
Reproduce code:
---------------
Stored proc is this:
DECLARE v_affiliate_id INTEGER DEFAULT NULL;
-- This SELECT INTO returns 0 rows:
select
affiliate_id INTO v_affiliate_id
from
affiliates
where
user_name = v_user_name
and password_hash = v_password_hash;
if ( v_affiliate_id IS NULL ) THEN
SET v_affiliate_id := -1;
end if;
-- This is the result set row:
select v_affiliate_id;
Expected result:
----------------
When I run this from the MySQL command line, I get 1 row, 1 warning
(1329).
When I run from PHP, I *expect* to see a result set with 1 row.
Actual result:
--------------
When I run from PHP, the result set from mysqli_query() is NULL.
--
Edit bug report at http://bugs.php.net/?id=40870&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40870&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40870&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40870&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40870&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40870&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40870&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40870&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40870&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40870&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40870&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40870&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40870&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40870&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40870&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40870&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40870&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40870&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40870&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40870&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40870&r=mysqlcfg
- 11
- Why is my MySQL table building an "Overhead"/what is that/how can I prevent it?Hey Folks,
I hope you'll be nice to me and let this post go through even know its
mysql and not directly php.
But of course my script is php.
The problem is, that my Table (1,8 MIO entries/100 MB/MyISAM) is not
working anymore. Everytime my script wants to write in something the
number of entries decreases, and at the "Overhead" column the number is
growing.
How can I make my table work without that overhead problem, without any
further crashes and without loosing my data?
If I use the repair or optimize function (phpmyadmin) the overhead is
deleted, but the data is still lost, and the next time my script trys
to put in something more entries will be deleted.
I hope you can help me with this.
Have a good Sunday.
Flo.
- 15
- PHP hostingcan someone point me in the direction of their favorite PHP supported web
host? Maybe a company that you have had good luck with, and is relatively
cheap. I'm a small buisness and can't really afford to pay tons of money.
Maybe some where in the $8 - $14 a month. Thanks alot.
greg g.
- 15
- Great Computing Surface for Road Warriors
Despite having worked with a laptop day in day out, I only landed up
with aching wrists, strained neck and back; with my work still
pending. I could quote several reasons for it - my laptop processor
runs too hot, my laptop keeps slipping from the pillow, plus the
aching back. I know most of you agree with me. Now let me share with
you the absolutely comfortable solution I found. It's called the
laptop desk which revolutionized the whole process of computing for me
with it's ergonomic design and heat dissipating ventilation channels.
I highly recommend it, check it for yourself - www.laptopdesk.net
- 16
- RephraseOK, what I meant was
1) Not count as though the user manually navigated to that page (for my
sanity when checking the site statistics!)
and
2) I also need to know how to run a expression-ish thing so that when I
'parse' the text, it returns all text between x and y, but parse it
BEFORE it gets 'included'.
Note: fOpen is NOT enabled, and I CAN'T enable it.
Thanks in advance
P.S. Sorry mike for my previous ungracious answer.
|
| Author |
Message |
sir_pancake

|
Posted: 2004-4-19 1:05:23 |
Top |
php-general, Is it possible to do this
Heya,
I'm have a problem with a php file and looking for information in
a mysql database.
Basically, in my database is the field "groups" which will
contain all the groups a user is registered too, for example, user
Bob is registered to groups: group1, group2, group3'.
(In the database that would shown in the column as
'group1-group2-group3')
Is it possible to then run a mysql query which looks at the string of
information in that column and finds a certain group, much like the
explode function in php which would break the string down and put
each value into an array.
I know I haventt worded this very well, so I'll type it up in the
way it should flow.
need to find users who are members of group 1
open sql database, examine groups column
break down the contents and look for 'group1'
return value.
if this can't be done? If not, is there any other way of doing it
without searching every field of database and examining the contents
in a php script?
Thanks a lot!
----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
|
| |
|
| |
 |
Saint Amadeus

|
Posted: 2004-4-19 1:36:00 |
Top |
php-general >> Is it possible to do this
Einn wrote:
> Heya,
>
> I'm have a problem with a php file and looking for information in
> a mysql database.
>
> Basically, in my database is the field "groups" which will
> contain all the groups a user is registered too, for example, user
> Bob is registered to groups: group1, group2, group3'.
> (In the database that would shown in the column as
> 'group1-group2-group3')
>
> Is it possible to then run a mysql query which looks at the string of
> information in that column and finds a certain group, much like the
> explode function in php which would break the string down and put
> each value into an array.
> I know I haventt worded this very well, so I'll type it up in the
> way it should flow.
>
> need to find users who are members of group 1
> open sql database, examine groups column
> break down the contents and look for 'group1'
> return value.
>
> if this can't be done? If not, is there any other way of doing it
> without searching every field of database and examining the contents
> in a php script?
>
> Thanks a lot!
>
>
>
> ----------------------------------------
> The post originated from PHP Freaks:
> ----------------------------------------
> http://www.phpfreaks.com
> http://www.phpfreaks.com/forums
>
>
I sugest you a different approach:
three tables:
1) users (user_id, user_name, ...)
2) groups (group_id, group_name, ...)
3) users_groups(user_id, group_id)
then, when you looking for users who are members of group, you can use
this query:
select
user
from
users as u left outer join
(users_groups as u_g inner join
groups as g on u_g.group_id = g.group_id)
on u.user_id = u_g.user_id
where
g.group_name = 'group1'
;
It should be more efficient:), even if it looks a bit strange:)
Saint
|
| |
|
| |
 |
J.O. Aho

|
Posted: 2004-4-19 1:38:00 |
Top |
php-general >> Is it possible to do this
Einn wrote:
> Heya,
>
> I'm have a problem with a php file and looking for information in
> a mysql database.
>
> Basically, in my database is the field "groups" which will
> contain all the groups a user is registered too, for example, user
> Bob is registered to groups: group1, group2, group3'.
> (In the database that would shown in the column as
> 'group1-group2-group3')
> need to find users who are members of group 1
> open sql database, examine groups column
> break down the contents and look for 'group1'
> return value.
SELECT * FROM users WHERE groups LIKE '%group1%';
% = any character combination/string
//Aho
|
| |
|
| |
 |
| |
 |
Index ‹ php-general |
- Next
- 1
- php find differences in multi dimensional arraysI am looking for a way to find the differences between 2
multidimensional arrays. I have found ways to do this based on 1 key,
but I want to be able to look at differences based on all keys:
For example:
Array 1
[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION1"
["Category_Code"]=>
string(5) "WOR19"
[1]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION2"
["Category_Code"]=>
string(5) "WOR19"
Array 2
[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION1"
["Category_Code"]=>
string(5) "WOR19"
Resulting Array after identifying differences:
[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION2"
["Category_Code"]=>
string(5) "WOR19"
So if any of the multidimentional array values are different, then
there isn't a match and the "record" is returned.
Thanks
- 2
- A Peculiar Sort of Forum NeededAm looking for a sort of a forum. What's different is that all
postings would have one or more addressees, and postings wd be visible
only to them and the originator. Unthreaded is OK. (No, mail won't do
what I need.)
Env is a moderately small number of users.
I've dl'd and installed a number of PHP forums, but none so far have
the noted capabilities.
I'll do any minor/moderate revisions as needed. Open Source mandatory.
AS
- 3
- nested if'sI got lost on formatting the nested if/else's on the bottom of the
file right up the last else/if there seems to be a stray bracket. I'm
trying to line up the brackets so I can read it. Is it okay to split
a long line setting a variable on two lines at the equals sign? That
is so you can read it in google groups.
<?
//Send payement advices
$TPL_auction_id = $auction_id;
$user_id=$userrec["id"];
if(!$sessionVars["SELL_action"]) {
include "header.php";
}
if($FEE>0) {
if($SETTINGS["invoicing"] == 'y') {
if(!$sessionVars["SELL_action"]=="edit") {
include phpa_include("template_menu_php.html");
include phpa_include("template_sell_result_php.html");
} else {
$auction_url =
$SETTINGS["siteurl"] . "item.php?mode=1&id=".$auction_id;
if($sessionVars["SELL_action"]=="edit") {
unset($_SESSION["sessionVars"]);
unset($_SESSION["RELISTEDAUCTION"]);
if(isset($_SESSION['backtolist']))
header("Location: ".$_SESSION['backtolist']."?PAGE=
".$_SESSION['backtolist_page']);
else
header("Location: yourauctions.php?PAGE=
".$_SESSION['backtolist_page']);
exit;
}
if($sessionVars["SELL_action"]=="reopen") {
unset($_SESSION["sessionVars"]);
unset($_SESSION["RELISTEDAUCTION"]);
header("Location: yourauctions_c.php?PAGE=
".$_SESSION['backtolist_page']);
exit;
}
}
} elseif($SETTINGS["feetype"] == "prepay") {
if(!$sessionVars["SELL_action"]) {
//include "header.php";
}
include "lib/auctionsetup_payment.php";
} else {
if($sessionVars["SELL_action"]) {
include "header.php";
include phpa_include("template_menu_php.html");
}
?>
thanks,
- 4
- Put output of mysql into an ArrayHi,
Can somebody help me with the following?
I want to have the outcome of this:
$query = "SELECT markhow, COUNT(*) FROM prospects GROUP BY markhow";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
Put into an array like this (for example);
array(
"January 12" => 52,
"August 4" => 45
);
Thanks for your help!
Regards,
Frank
- 5
- PHP 4.3.4, FreeBSD 4.9, Apache 1.3.28, System V IPCAfter configuring the php 4.3.3 installation, as follows:
'./configure' '--with-pgsql' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--with-gd' '--with-zlib' '--with-jpeg' (copied from the
phpinfo() output)
after the first call to shmop_open() function php fails with the error
"Fatal error: Call to undefined function: shmop_open()"
As far as I understand, the System V IPC support must be built-in after
'--enable-sysvshm' flaf, but it is not. What shoud I do to fix this?
Information:
OS: FreeBSD 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct i386
PHP: 4.3.4
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
_ENV["SERVER_SOFTWARE"] Apache/1.3.28 (Unix)
- 6
- 7
- redirect on successful submisssion to another page in QuickformDear Sir/Madam
I have a simple problem while using require_once functionality.
Page1.php is using as an input form , and after input, the control will
be transfered to pgae2.php with the same Workspace env as page1.php.
Page2.php will be displayed as per my requirement, however after the
page2.form,
again the page1.php will be dusplayed a the tail.
All form varible of page1.pgp are accessable in the page2.php.
However the control is not transfered as expected.
image of the problem (tested and you can re-produce the errors);
Php 5.04/Apache 2, windows 2003
--page1.php--
<?php
/*
PROBLEM: After using the Require_once 'page2.php' it still re-displays
the page1.php at the end of the
Displayed page2.php
image of the problem
------------------------------page1.php-------------------------
*/
require_once('HTML/QuickForm.php');
$obj_search_form = new HTML_QuickForm('frmSearch','POST');
$obj_search_form->addElement('text','txtCode','CODE:',array('size'
=>10,'maxlength' =>10));
$obj_submit[] = &HTML_QuickForm::createElement('submit', 'btnSubmit',
'GO');
$obj_search_form->addGroup($obj_submit, '', '', '  ');
if($obj_search_form->validate()) {
// post-validation filters comes here
$obj_search_form->applyFilter('__ALL__', 'addslashes');
// "search_mserver_logdata" function to search
$obj_search_form->process('search_mserver_logdata', false);
//require_once('page2.php.php');
// the above direction does not pass varibles to page2.php
}
function search_mserver_logdata($ary_sloginput_info) {
$tcode=$ary_sloginput_info['txtCode'];
echo "before calling: $tcode ";
echo " ";
require_once('page2.php');
}
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS
Pragma: no-cache">
<TITLE>Serverlogcheck</TITLE>
</HEAD>
<BODY>
<?php
// display the form here
$obj_search_form->display();
?>
</BODY>
</HTML>
------------------Page2.php----------
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS
Pragma: no-cache">
<TITLE>Serverlogcheck</TITLE>
</HEAD>
<BODY>
<?php
// display the data here
$tActcode=$ary_sloginput_info['txtCode'];
echo "<P>";
echo var_dump($ary_sloginput_info);
echo "<P>";
echo " inside the page2.php: $tActcode";
?>
<p>c 2005 baka. All rights reserved.</p>
</BODY>
</HTML>
----------------------page2.pgp ends here---
Thanks for the wondeful reply.
baka
Tokyo,Japan
- 8
- OOP slow -- am I an idiot?I think perhaps I'm using classes and OOP incorrectly. The last time I used them, they were slow.
I want to create a "customer" class which fetches its attributes from a MySQL database. Something
like this pseudocode:
class customer
{
...
getName ($id)
{
$result = mysql_query ("SELECT name FROM customers WHERE id = '$id'");
return mysql_result ($result, 0);
}
getRevenue ($id,$department,$month,$year)
{
$result = mysql_query ("SELECT revenue FROM customer_revenue WHERE customer_id = '$id' AND
department = '$department' AND month = '$month' AND year = '$year'");
return mysql_result ($result, 0);
}
...
}
(Again, that's just psedocode. Haven't written anything yet.)
That works great for just one revenue result, but what if I want to return several results? What
if I want to build a report with hundreds of customers' revenues for a month? For several months?
For an entire year? Doesn't it slow wayyyy down? It seemed to in the past. The method above
doesn't seem to scale well.
I did something like the above a few years ago. It was slow, and I think it's because it was
doing this for each single row:
* Instantiate the class
* Perform a query for the name
* Perform a query for the first department
* Perform a query for the next department
* Perform a query for the next department
* Perform a query for the next department
* Perform a query for the next department
* Perform a query for the next department
* Perform a query for the next department
...
* Destroy the instantiation
* Start over
I love using object-oriented programming, but it seems to me that's ALOT of performance burden
when I could just do something like this:
SELECT customers.name,
customer_revenue.revenue
FROM customers
INNER JOIN customer_revenue
ON customers.id = customer_revenue.customer_id
WHERE customer_revenue.department = '$department'
AND customer_revenue.month = '$month'
AND customer_revenue.year = '$year'
(PHP loop to display all results)
That seems like it would perform 20x faster.
It seems that the SQL economies of scale (ability to rapidly slurp large sets of data) are
completely bypassed when using OOP to view ALOT of objects together on one screen. It seems if I
want decent performance I would have to ignore OOP rules of method hiding and access the data
directly when using anything more than just a few objects on one page.
A workaround -- I thought that perhaps I could fetch ALL of the data for a customer into memory
upon initial instantiation, wherein I perform something like this:
SELECT *
FROM customers
INNER JOIN customer_revenue
ON customers.id = customer_revenue.customer_id
WHERE customers.id = '$id'
And then use the results from memory as-needed. It would be all data for a customer from all
years across all departments.
That might perform better but it'd suck ALOT of data into memory, and what if I add more than just
revenue to my customer class? Each customer could potentially represent a limitless set of data.
So this doesn't seem like an optimal solution.
* Where am I going wrong?
* Tell me how YOU fetch data from multiple objects to generate reports.
* Is this an instance where it's better to just ignore OOP rules and go straight to the data?
Whew, that's not fun to think about, particularly if my queries ever get to be more complex.
Feedback, please. The goal is to maintain complex queries in just one place -- inside a class. I
want my data to _only_ be accessed from the black box called an OOP class.
CD
Think you're a good person? Yeah, right! ;-)
Prove it and get ten thousand dollars:
TenThousandDollarOffer.com
- 9
- CD Image upload script?Has anyone come across a script that will co-ordinate an upload of a cd
image to a php backend? It would be a bonus if it also supported restart
of partially uploaded images. Commercial software is fine for this
application.
Thanks
-david-
- 10
- file_get_contentsHi,
I have installed the latest version of PHP on my Windows machine
(running Keyfocus web server). How (in simple steps) can I install the
function or enable the function file_get_contents()?
Thanks
Antony
- 11
- for loop break and continueHi,
Is there an equivalent to the C++ 'break' command to stop execution of a for
loop? I know I can use 'goto' but I don't want to unless I have to.
for ($i=0; $i<$n; $i++)
if (some condition)
break;
And, what about 'continue' which skips the rest of the code in the for loop
and immediately goes on to the next iteration?
Thanks,
Rich
- 12
- Buxa Coding GuidelinesHi NG!
Just wanted to see what you think of the strictness of Buxa, according to
their PHP guidelines:
http://www.buxaprojects.com/en/php_coding_guidelines.htm
In their oppinion stuff like the short PHP init "<?" or inline echo "<?=
$var ?>" is forbidden.
Do you people code that strict?
--
Kind regards,
magoo
- 13
- Session ID in PHPHi everyone,
New to PHP here (& Doing pretty well so far)
I have one missing link in my small web app - how do i implemet session
ID in PHP?
For example, if I want to create a web-based mail app google style
- 14
- [PHP] Newbie - is there a function similar to the sql 'like' comparison operator?Hi RevDave
Theres the similar_text() function which calculates the procentage of te
similarity between
two strings.
If your looking for a check to see if a string has some specified text then
use the strpos()
function and then the identical comparison operator to check for true and
false
Kalle Sommer Nielsen
DR - www.dr.dk
----- Original Message -----
From: "revDAVE" <email***@***.com>
To: "PHP General" <email***@***.com>
Sent: Thursday, May 08, 2008 5:20 PM
Subject: [PHP] Newbie - is there a function similar to the sql 'like'
comparison operator?
> Newbie - is there a function similar to the sql 'like' comparison
> operator?
>
> I would like to be able to compare 2 strings:
>
> If $this ---*like or similar to*--- $that
>
> That type of thing...
>
>
> I know of this page:
>
> http://us3.php.net/manual/sl/language.operators.comparison.php
>
>
> But I don't see something 'like' or 'similar' to something else
>
>
> --
> Thanks - RevDave
> Cool @ hosting4days . com
> [db-lists]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date:
> 07-05-2008 17:23
>
>
- 15
- [PHP] problem with php[4,5] (horde 2/3)Norbert Ehart wrote:
> hello,
>
> i have some problem with horde, after my isp have upgraded php on my
> vps! i only get some error massages.
>
>
> Notice: Only variable references should be returned by reference in
> /usr/share/horde3/lib/Horde/Perms.php on line 343
>
> Notice: Only variable references should be returned by reference in
> /usr/share/horde3/lib/Horde/Auth.php on line 1193
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /usr/share/horde3/lib/Horde/Perms.php:343) in
> /usr/share/horde3/index.php on line 51
Talk to the horde mailing list / forum. They need to fix this properly.
--
Postgresql & php tutorials
http://www.designmagick.com/
|
|
|