Hi,
i'm looking to call a custom error log/debug function at the end of each function.
example:
i want to call error_log(__METHOD__);
I want to echo $query;
show execution time etc..
at the end of every function for debug purposes without having to call that customized function every time.
much appreciated.
...
I am using PHP and Mysql for developing an application. we have two copies of database, one at local server(i.e our end) and one at web server. we want to sync both the database so that if any change made in local database should also reflect on the webserver database. is that possible??
Currently we are using PHP scripts to do so..which...
Possible Duplicate:
How do I recursively delete a directory and its entire contents (files+sub dirs) in PHP?
How can I delete a directory with other directories and images and php files in it using PHP.
Here is what I'm trying below but with no success.
unlink("./members/9/");
rmdir("./members/9/");
...
What I'm looking for is a how to build a function that takes a child folder an loops through it and backwards in the directory hierarchy to find the first matching file that is specified.
A example is that i lets say i have the directory structure:
Home / Folder 1 / Folder 2 / Folder 3
And I'm looking for the file style.css.
I would l...
I'm using the following PHP code to list all files and folders under the current directory:
<?php
$dirname = ".";
$dir = opendir($dirname);
?>
<?php
while(false != ($file = readdir($dir)))
{
if(($file != ".") and ($file != "..") and ($file != "index.php"))
{
echo("<a href='$file'>$file</a> <br />");
}
}
?>
The problem is list is not ...
I would like to add my_path to include_path and include files relatively to my_path.
Is that enough to set the include_path using set_include_path in the main PHP file of my website, or I must do this in every PHP file ?
...
I have created a form. Now I want to check if the username entered by the user is already on the database or not. If yes, I want it to display an error message.
Thanks
...
Here is line 37;
$write = mysql_query("INSERT INTO `trial' VALUES (" '', '".$ip."', '1' ") or die(mysql_error());
The error may be coming from further up.. But I'm not quite sure :S
I am trying to block the ip of a
...
In MyBB forums you must have seen that all those threads are stoed as forum.com/Thread-Name-of-the-thread
So now this is static right ?
So now i have a site which has
blog.com/search.php?=SEARCHED+TEXT
So now how do i save this search so that Google can find out this page on my site ?
Indirectly what i mean to say is how i can i make...
I'm using following code:
$config['base_url'] = "http://www.aaa.com/";
Also Im using Flash navigation:
on(release) {
getURL("http://www.aaa.com/xxx/index");
}
The Problem is When I give url as http://aaa.com in address bar Flash navigation link is not working. If i give link from http://www.aaa.com its work perfectly.
Can anyone s...
I search for a round-trip programming solution which does generate PHP and SQL code from a UML Model
It sould also include state and activity diagrams which were compiled into PHP/SQL.
Or does someone know some software who offers the possibility to create my own PHP / UML interpreter?
thanx in advance
...
I need some advice on the pro and cons of certain image strategies. When creating websites which are very picture heavy I it important that all the images are the best possible quality with as little impact on performance.
Lets take for example a page that mimics a review of a product. You may have a normal sized product shot and multipl...
<?php
$file = 'example.txt';
$newfile = 'example.txt.bak';
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
?>
Now instead of example.txt can i use "http://engine.searchr.us/web-search.phtml?search=TEST+SEARCH" ?
Is it possible ?
...
i am trying to make a pdf file with wkhtmltopdf when i pass url www.example.com pdf is generating or www.example.com?id=1
but when i try to put another parameter command execution is not working
www.example.com?id=1&type=u
shell_exec("c:\pdf\wkhtmltopdf.exe
http://localhost/test/index.php?id=1&typee=abc
test.pdf ");
i t...
How can I show what all the objects' methods and properties are?
That is, including the property's values?
...
Hi there!
In this tutorial's processRequest method:
...
switch ($request_method){
case 'get':
$data = $_GET;
break;
case 'post':
$data = $_POST;
break;
...
looks like $_GET variables are ignored when $_POST happens (at least this happening in my test setup - not the same script but idea is similar).
...
Hi
I have a large sql file < 600 MB.
This files is backup for forum and I want to upload it to empty db.
How I can upload it??
I can't use PHPMyAdmin? and I used BigDump and it doesn't insert all tables.
How to do it?? Is there any other way?
Thanks
EDIT : I don't have access to command line, I just have my CPanel
...
I just got my self a new laptop, it runs on windows 7 and i am in deliberation what dev environment to set up.
I have most of my life used wamp set up, on windows machines for local dev environments. Here i recently installed IIS and it looks very convenient to set up sites and so on and so forth.
So I am thinking of installing php and...
Let's say I have to xml documents:
<first_root>
<element1/>
<element2>
<embedded_element/>
</element2>
</first_root>
and
<foo>
<bar/>
</foo>
How can I put this second xml doc into the first one, using php and DomDocument or SimpleXML?
I want it to look like something like this:
<first_root>
<element1/>
<element2>
...
I am trying to implement a membership subscription service on a website built in CodeIgniter. I wish to use PayPal to manage payments, and am having a very hard time implementing this.
What I am trying to achieve is:
User fills in a membership form with
personal details
User selects a
subscription option (1 of 8 choices - each differe...