When you add the below html link to your php file
@ 2014 Designed by Qiunique All rights reserved.
The website doesn''t go to www.linkedin.com/in/xiaoshu, but a sub-directory instead. The trick is to add http: in front of the link, otherwise php thinks they are special characters and will try to go to its subdirectory and look for it.
@ 2014 Designed by Qiunique All rights reserved.
Thursday, October 9, 2014
HTTP Header already sent
This will happen if you include a separate php form on the index.php page, but you have something else (other html code) before this php form. In this case, you need to turn on output buffering.
There are some Lynda.com videos which offer detailed explanation on HTTP header and output buffering:
Very often, you won't have access to your php.ini files on the server. You can modify all php files by doing the below:
There are some Lynda.com videos which offer detailed explanation on HTTP header and output buffering:
PHP with MySQL Essential Training - Modifying Headers, page redirection, and output buffering
You can turn on output buffering either on each php file, or you can do it in the php.ini. Only one way is required but you are free to do both.
Very often, you won't have access to your php.ini files on the server. You can modify all php files by doing the below:
at the beginning of all the php files, write
ob_start();
?>
at the very end of the php files, write
ob_end_flush();
?>
Bear in mind that if you do an include (anotherfile.php) in the index.php file, you might need to modify the file directories for the css, js, or whatever other files you have in the included php file, as this file is seeing the folder structure from the root level.
Thursday, September 18, 2014
Connect to PHPMyAdmin SQL database connection file script
This is a test page
$message = '';
$db = new MySQLi('localhost', 'root', 'root');
if ($db->connect_error) {
$message = $db->connect_error;
} else {
$message = 'Connection is OK';
}
?>
echo "
}?>
$message = '';
$db = new MySQLi('localhost', 'root', 'root');
if ($db->connect_error) {
$message = $db->connect_error;
} else {
$message = 'Connection is OK';
}
?>
echo "
$message
";}?>
Monday, June 9, 2014
Wordpress structure
The database config file
wp-config.php in the root directory
The most important files&folders in your wordpress directory
wp-config file for database
wp-content - for your uploaded images (remember to copy this folder if you want to export your wordpress site)
and your database
everything else is replaceable
wp-config.php in the root directory
The most important files&folders in your wordpress directory
wp-config file for database
wp-content - for your uploaded images (remember to copy this folder if you want to export your wordpress site)
and your database
everything else is replaceable
Wednesday, May 28, 2014
How to Save an html web site and load it up on your local host
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs put your files in there
then go to your browser, http://localhost/filename.html
Note: You have to type this in browser. Double clicking in file explorer might not work.
This is useful when you test your Dreamwaver code in an IE browser and it doesn't work, you could load it up directly on localhost and it will work.
then go to your browser, http://localhost/filename.html
Note: You have to type this in browser. Double clicking in file explorer might not work.
This is useful when you test your Dreamwaver code in an IE browser and it doesn't work, you could load it up directly on localhost and it will work.
Friday, May 16, 2014
Photoshop Basics
Expanding the Canvas
Shortcut 'C' to select the crop tool
Then Shift+Alt to resize from the centre
Zoom in on MAC: Command +
Lasso - l key
Marquee - m key
Quick way to find your layer you want: mouse over a layer, alt+right click
Shortcut 'C' to select the crop tool
Then Shift+Alt to resize from the centre
Zoom in on MAC: Command +
Lasso - l key
Marquee - m key
Quick way to find your layer you want: mouse over a layer, alt+right click
Make a duplicate copy of a
layer - alt+shift+right drag
Control + D to deselect
Control + T to transform
Use quick mask to do a selection
Press D to go back to default colour
Press Q for quick mask mode
Press B for Brush tool
Then gently paint over the area you want
Once you are done, press Q to exit Quick mask and leave the area selected
How to change the colour for a specific area:
Do all the steps of quick mask above
Click on the adjustments panel > Hue/Saturation > Properties tab > mask > invert > Hue/Saturation tab > tick the colorise box > change the brightness/hue/etc.
Click on the quick mask tool (just below the colour on the left)
Subscribe to:
Posts (Atom)