Hello,
I wrote a basic content-management system for my website, including an administration panel. I understand basic file IO as well as copying via PHP, but my attempts at a backup script callable from the script have failed. I tried doing this:
//... authentication, other functions
for(scandir($homedir) as $buffer){
if(is_dir($b...
I have a config.inc file in a web app that I am building. It contains an array with config values for things like the mysql database, etc. I would like these to be entered by using a simple form, that asks for the server, login/password for the database, etc, then these get written to the config. file.
Is there a preferred method of d...
Hi,
i'm programming a php/mysql web app which is kinda like a blogging platform where people can upload pictures and post them.
What is the best way to store these images , Storing them in a folder or in mySQL table through BLOB ?
i ask this because i want the most simple way which let me easily move to another host/server without spe...
I have way too many modules in my application. Currently my modules are namespaced, but what I'd like to do is have a directory structure so I can get rid of this redundant and annoying namespacing.
For instance, for modules named "xModule1, xModule2, xModule3", I'd like to have a directory structure like this:
-x
-module1
-acti...
I'm currently using a modified CSS Cacheer as an alternative but its syntax is somewhat vague and adoption is, well, abysmally low... Documentation is hard to come by as well.
I'm looking to switch to SASS as it has a bigger user base than CSS Cacheer and better documentation. I am aware of phpHaml but it doesn't have support for SASS y...
I am working on a project to test if I can use SWFTools on my site. I have created this script to just display scrolling text on the screen of the user's choice.
All the information you need to know is below:
Additional Info that might help you:
PHP info version info:
PHP 5.2.12 (cli) (built: Dec 16 2009 17:03:10)
Copyright (c) 1997-20...
Hello
i have a weird problem where css generated via php (stuck with a weird cms from an even weider programmer) is ingored by firefox 3.X and probably earlier. But the page loads ok in other browsers like IE7/8 and chrome. Also firebug doesn't see the css either but when i point my browser to the php-css-generation script it show me a ...
Hi, i got an answer on an older question wich is almost working
i have a function:
function vraagOp($table,$where)
{
static $rVraagOp;
if(!$rVraagOp){
$qVraagOp = "SELECT * FROM $table WHERE $where";
$rVraagOp = mysql_query( $qVraagOp );
}
return mysql_fetch_assoc( $rVraagOp );
}
that i want to use li...
The following code results to an error
Call to a member function
real_escape_string() on a non-object
But if place the ($this->conn = new mysqli)
inside the escapedString($string) method, it will run without error. What
can be the reason of the error? Thank you.
private $onMagicQuote;
private $conn;
function __contruct(){
...
When retrieving the path from the input file, using $_POST,
the path is being picture.jpg
and I need to have the full path i.e. C:/C:\Documents and Settings...\picture.jpg
what do i have to use ???
...
Hi,
I am trying to connect my PHP code to MySQL safely with the following code:
<html>
<?php
$con = mysql_connect("localhost:3306","root","password");
if(!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
echo "Connection established!";
}
mysql_close($con);
?>
</html>
But I keep getting the following error mes...
Hello,
I'm posting simple version of php and Jquery code of the page that I need to create.
As you can see, this example contains PHP break functions, and the name of this page is test.php.
The problem is, when I try to open the first part of this page (case 1) Jquery load function successfully is started and successfully load case 2 ...
I often have to extract a pattern from a PSD to make an image to be used with XHTML and CSS.
I have often just made a guess in Photoshop, and then had to correct my guesses a few time after. It seems cumbersome.
Is there...
Techniques for extracting a pattern from a Photoshop file with the selector tool?
A Photoshop plugin perhaps th...
I am writing a small web server, nothing fancy, I basically just want to be able to show some files. I would like to use PHP though, and im wondering if just putting the php code inside of the html will be fine, or if I need to actually use some type of PHP library?
http://www.adp-gmbh.ch/win/misc/webserver.html
I just downloaded that ...
I am trying to figure out how one would start the setup of a small CMS.
I have the groundwork built, but the step of creating the database tables in mysql, should this all be done at once in a install.php file? Is there a preferred method for creating many tables at once, even if I don't need to insert data into them at this time?
...
I know this isn't very relevant to programming, but I need to know how a convolution matrix works for a PHP GD function. I've searched a lot on Google, but can't find anything that explains it well.
...
I have an email address mike.o'[email protected] stored in a posted variable and I want a select statement in mysql to validate the existance of the email address and retrieve a password from my table.
My query gets stuck at the apostophe when it trys to execute. eg "SELECT pwd FROM tbl_users WHERE userName = '$email'";
Any assistance wi...
I want to write a small script to know if two URLS lead to the same page. For example: http://google.com and http://google.com/# will lead to the same URL. Also sometimes http://URL1.com and http://URL2.com also lead to the same page although they are not the same URL.
Is there an easy way to do that?
If you need more information pleas...
My sample index.php
include 'class.php';
$x = new class;
include $_GET['page'].'.php'; //checks if isset file_exists and in_array of valid file names before including;
I want to make sure the page being included can't be accessed directly. Below are some examples of code I'm placing on the first line of code on the files that are bein...
if i have a menu such as
<a href="index.php">home</a>
<a href="aboutus.php">about us</a>
<a href="contact.php">contact us</a>
inside a file called menu.php
and this menu.php file gets include into pages all across the application. but what if i create a new folder and call it portfolio and in this folder there is a file named example...