CSS @import import another sheet style syntax

in html:

<style type="text/css">
@import url("import1.css");
@import url "import2.css";
</style>

in css sheet:

@import url("import1.css");

your standard css sheet link for html doc:

<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

Posted on 16 Dec 2009, 14:48 - Category: CSS
No comments - Edit - Delete


Remove element from div Javascript

<div id="image_holder_on">
<img id="on_image" src="command.src" style="visibility:hidden;"/>
<script>
var d_on = document.getElementById('image_holder_on');
var on_image = document.getElementById('on_image');
d_on.removeChild(on_image);
</script>
</div>

Posted on 14 Dec 2009, 15:15 - Category: JavaScript
No comments - Edit - Delete


enable fopen include turn off safe mode Godaddy godaddy

FTP to root of hosting account new php.ini file
godaddy

name it php5.ini (account with php5)

turn off safe mode, and turn on allow_url_fopen and allow_url_include

actual file text follows:
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On

extension=php_http.dll

safe_mode = off

Posted on 14 Dec 2009, 14:52 - Category: Godaddy
No comments - Edit - Delete


CURL Aviosys IP9258 HTTP Command PHP works with include turned off!

<?
if(isset($_POST['ON']))
{
// make sure curl is installed
if (function_exists('curl_init')) {
// initialize a new curl resource
$ch = curl_init();
// set the url to fetch
curl_setopt($ch, CURLOPT_URL, 'http://login:password@99.999.11.118/Set.cmd?CMD=SetPower+P60=1');
// set the port
//curl_setopt($ch, CURLOPT_PORT, "219");
// don't give me the headers just the content
curl_setopt($ch, CURLOPT_HEADER, 0);
// return the value instead of printing the response to browser
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// use a user agent to mimic a browser
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
$content = curl_exec($ch);
// remember to always close the session and free all resources
curl_close($ch);
} else {
echo "error";
}
}
if(isset($_POST['OFF']))
{
// make sure curl is installed
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://login:password@99.999.11.118/Set.cmd?CMD=SetPower+P60=0');
//curl_setopt($ch, CURLOPT_PORT, '219');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
$content = curl_exec($ch);
curl_close($ch);
} else {
echo "error";
}
}
?>
<html>
<head>
<!--<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Power Tree</title>
</head>
<body>
<form method="post" name="post_on">
<!--
<input type="hidden" name="ON" value="ON" />
<a onclick="javascript: document.post_on.submit();">Power Tree All - On</a>
-->
<input type="submit" name="ON" value="Power Tree - All - On" />
</form>
<br />
<form method="post" name="post_off">
<input type="submit" name="OFF" value="Power Tree - All - Off" />
</form>
<br />
<div id="content"><? if($content){ echo $content; } ?></div>

Posted on 11 Dec 2009, 14:18 - Category: Php
No comments - Edit - Delete


MySQL update set REPLACE practice string search and replace

update table1 set column1 = REPLACE(column1,"string_to_find","string_to_find_altered")



Posted on 1 Dec 2009, 17:56 - Category: MySQL
No comments - Edit - Delete


Pages: [1] [2] [3] [4] [5] [6] ...
Loading