Hi!
I cant find the way how to strip the useless section of my string (read from SQL)
I've tried the strreplace and truncate but those was not good at all.
I've got a string variable called $stuff
if $stuff = 145_timestamp i want to clear the _ and the chars after it. so i want to $stuff be 145 only. Thanks.
...
I am giving downloads to user using the PHP code below but when user downloading they are not able to see the progressbar in IE8 when clicked on save button. Please solve this.
Thanks in advance.
header('Content-Description: Songsbin.com - Downlaod');
header('Content-type: audio/mpeg');
header('Content-Disposition: attachment; filename=...
in file.php:
call()...
How to get absolute path of file.php inside call() ?
Pay attention that call() may be defined in another file.
another.php:
function call(){..}
file.php:
include(path_to_another.php);
call();
...
It's very odd,has anyone ever sum up with a conclusion yet?
Sometimes it checks the directory of the included file,too.
But sometimes not.
D:\test\1.php
<?php
include('sub\2.php');
D:\test\2.php
<?php
include('3.php');
Where 3.php is in the same dir as 2.php.
The above works,but why?The current directory should be D:\test,but...
Hi on our dev environment we have show all errors, warnings and notices. I'm getting this:
Notice: Use of undefined constant CURLOPT_PROTOCOLS - assumed 'CURLOPT_PROTOCOLS' in C:\notion\implementation\development\asterix\library\ExternalLibs\panda.php on line 69
Notice: Use of undefined constant CURLPROTO_HTTP - assumed 'CURLPROTO_HTT...
Hey guys,
I am trying to make an xml file to export my data from my database to my iphone. Each time I create a new post, I need to execute a php file to create a xml file containing the latest post ;)
Okay so far ? :D
Here is current php code ... but my nsxmlparser gives me an error code (33 - String is not started). I have no idea w...
It's functionality is so strong that I worry about its stability and performance.
What do you think?
UPDATE
What I'm doing is this:
$old_dir = getcwd();
chdir( dirname($included_file) );
include ( $included_file );
chdir( $old_dir );
Essentially it just does include ( $included_file );,but inside that $included_file...
Why doesn't this work?
define("STR_TEST", "qwerty");
class Test
{
public $arrTest = array(
"test"=>"Bla bla bla ".STR_TEST
);
}
$objTest = new Test();
print($objTest->arrTest["test"]);
...
Can anybody tell me what is meant by web services?
How do they work?
and more information about it.
...
I am kinda new to database designing so i ask for some advices or some kind of a good pattern.
The situation is that, there is one database, few tables and many users. How should i design the database, or / and which types of queries should i use, to make it work, if users can interact with the database simultaneously? I mean, they have...
How do I post them to whatever page from here and how can I send these variables to several pages at the same time?
//catched those variables within the same page
$event = $_POST['event'];
$when = $_POST['eventdate'];
$where = $_POST['place'];
$name = $_POST['name'];
$tel = $_POST['tel'];
$email = $_POST['email'];
send $event, $when, $w...
I've been using CodeIgniter for some quite time, and I've been extremely happy with its Active Record stuff. It's great to query the database with it.
Recently I've started a new project and I can't use such a framework anymore.
Is there a simple PHP Active Record library that does its job and gets out of the way (similar to CodeIgnite...
Good day!
I've found interesting behaviour for both LAMP stack and ASP.NET.
The scenario:
There is page performing task in 2-3 minutes (making HttpWebRequest for ASP.NET and curl for PHP). While this page is processed all other requests to this virtual host from the same browser are not processed (even if I use different browsers from...
Trying to setup a CodeIgniter based project for local development (LAMP stack), and once all the config file were updated (meaning I successfully had meaningful bootstrap errors for CodeIgniter), I get this error in my browsers:
Chrome
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
Firefox
Content Encoding Error: The page...
This link
http://ajaxcontroltoolkit.codeplex.com/releases/view/11121#DownloadId=28808
shows a popup on which one has to agree before being able to download.
So how to automate this with PHP curl ? Any existing similar sample code ?
...
I have my mod_rewrite set up so that it redirects all requests that aren't targeting existing files or directories to index.php?req=* where * is the request.
Works all fine but when I send the browser to something like this:
http://myurl/A/B/C
The browser tries to find all images, stylesheets in the non-existing folder C. How can I m...
Hi,
i have three mysql tables:
Table 456
id | binder | property1
1 | b | hello
2 | b | goodbye
3 | a | bonjour
Table binder
id | binder | tableid1 | tableid2
1 | a | 23 | 456
2 | b | 21 | 456
3 | c | 45 | 42
Table 21
id | property1 | data..
1 | goodbye | data about goodbye..
2 | ciao | data about ciao..
So first i want to select in...
in
/Users/username/Sites/somesite/.htaccess
I have
AllowOverride All
php_value include_path ".:/Users/username/Sites/somesite/inludesFolder:/usr/lib/php"
I have also modified
/etc/apache2/httpd.conf
to
AllowOverride All
and restarted websharing, but it's not finding the additional include path. I'd like to avoid modifying t...
Ive got a site that does a few ajax calls on page load, now for some reason, codeIgnitor is inserting 4 sessions (I'm assuming for each ajax call) as you load the page. I'm storing the sessions in the database.
I'm pretty sure there should only be one session per browser? FF seems to only generate one, other browsers seem to create a wh...
I have form where user submits field. Field can have letters, numbers, and punctuation. But I want to check to make sure that at least 3 of the characters are letters. How can I regex that?
For example,
$string = "ab'c";
And I need something like,
if (preg_match("/[a-z]{3}/i", $string))
print "true";
else
print "false";
Th...