For mysql, "show table status" displays all table information such as NAME, TYPE, ROW_FORMAT, ROWS.....
How can I only display certain columns(not display all), for example only shows NAME, ROWS?
I'm sure there's a simple answer to this problem - I have a class that relies on a bunch of vars that are set in a config.php file. I want to be able to use these variables inside my class methods without having to include the config file in every method. For example, I am currently doing this...
Thanks for the help.
Now I got a issue, in createdb.sql, if I only create one table, the php code can generate it correctly, however if I want to create two tables, php cannot generate and gives error "Query failed: You have an error in your SQL syntax near 'CREATE TABLE profile...", I have...
Thanks for the reply.
Yes the db type is mysql.
I try to run sql script from php code to create table, but it fails.
<?
$dbhost = "localhost";
$dbusername = "root";
$dbpass = "";
$dbname = "dbname";
$connection = mysql_connect($dbhost, $dbusername, $dbpass);
$SelectedDB =...
For commercial php script, what is the approach to issue the license key? I have written php program, want to know how to generate and verify the license key, is there encryption involved? any help will be appreciated.
I have a text file, and want to insert line "<?php ... ?>" by PHP to the top of this file, I tried:
$file = "test.txt";
$fp = fopen($file,'r+');
$newline = "<?php echo "$abc"; ?>";
fwrite($fp,$newline);
fclose($fp);
but this will replace the character in text.txt with new line added, I need...
I try to delete directory with php code:
unlink("$dir/.");
rmdir("$dir");
unlink is supposed to delete all files under $dir folder, but it gives me error message "permission denied", actually I created $dir and its files within the same php file:
mkdir("$dir", 0755);
copy("abc.htm"...
I have a html file, now I want another php program to manipulate this file and add lines such as:
<?
include_once("abc");
?>
to the top of this html file, so it will look like:
<?
include_once("abc");
?>
<html>
<body>
....
</body>
</html>
how can I do that with php code? anyone can help me...
Wishdiak,
Thanks for the reply.
I'm new to PEAR, do you mean if I use Pear::Auth, I can combine apache htaccess and php login form together? so it not only use htaccess to protect folder, but also use php login form to pass username/password to htaccess then authenticate the user, redirect them...
I know there is a way to use php session/cookie to authenticate user's login and redict to member index page.
But this is only for user authentication, it doesn't provide any way to protect member folder, inside member folder, for php files, it's ok to detect session key to display or deny...
It's not my question, for example I have a simple php file(abc.php):
<?php
echo phpinfo();
?>
if I have this file in document folder, I can access it without any problem.
(www.mydomain.com/abc.php)
but if I move it to cgi-bin folder:
(www.mydomain.com/cgi-bin/abc.php), it won't work, it just...
I have a php file which runs correctly in document folder, now I want to move it to the cgi-bin folder, however it shows blank page when I try to access it, why the same php file cannot run in the cgi-bin folder, what approach I need to take (modify httpd.conf?) to have this file runs correctly...
Hi,
There is "window.print();" to print whole page, now I have form textarea box on this page and want only print the contents of this textarea box(it has scroll bar on the right side), how can I do that? can I use javascript or something else to print it? thanks in advance.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.