I have a folder on my website just for random files. I used php opendir to list all the files so i can style the page a bit. But the files that I uploaded with special characters in them don't work. when i click on them it says the files are not found. but when i check the directory, the files are there. seems like the links are wrong. a...
Hi I have been reading alot of articles adoring the PEAR mail package and it seems like PEAR is something I need to try out.
I am interested in setting up a full mail server, similar to a conventional SMTP mail service; which incorporates mail queuing, resending with a backend database etc. My impression is that PEAR can do this but can...
I am trying to use SEO-friendly URLs for a website. The website displays information in hierarchical manner. For instance, if my website was about cars I would want the URL 'http://example.com/ford' to show all Ford models stored in my 'cars' table. Then the URL 'http://example.com/ford/explorer' would show all the Ford Explorer Model...
I have a PHP file with one simple echo function:
echo 'アクセスは撥ねりません。';
but when I access that page i get this:
????????????
Can someone help me?
I also have my page encoding set to UTF-8, and I know it, because all of the browsers i used said so.
I also do this before the echo function:
mb_internal_encoding('UTF-8');
What does th...
Hey guys,
How can I split this line:
我 [wǒ] - (pronoun) I or me 你 [nǐ] - (pronoun) you (second person singular); yourself 他 [tā] - (pronoun) he or him
into three lines like this:
我 [wǒ] - (pronoun) I or me
你 [nǐ] - (pronoun) you (second person singular); yourself
他 [tā] - (pronoun) he or him
let's say, insert <br /> tag after each...
Hi guys,
Is there any way to extract hyperlinks from .doc. I got bunch of hyperlinks in doc that I need to import in my database.
I have tried converting doc to HTML, but hyperlinks are not transferred.
Regardz,
Mladen
...
I am getting an error with this in php. What is the correct way to format this string to pass to mysql_query() in php?
SELECT count(*) FROM agents INTO @AgentCount;
SELECT user_agent_parsed, user_agent_original, COUNT( user_agent_parsed ) AS thecount,
COUNT( * ) / ( @AgentCount) AS percentage
FROM agents
GROUP BY user_agent_parse...
I am using Open ID on my website using Dope Openid library but I would like to add facebook as an open id provider to the list since facebook also supports OpenID...Can anyone help me out with an explanation or link me to a tutorial (staga.net is using it flawlessly on their site)
*if someone can also explain to me how Staga is using but...
So recently I've really started to use php actively, and I need some insights on different ways to use database connections.
At first I just used the simple mysql_connect():
<?php
$connection = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_DB, $connection);
?>
After a while I created a da...
I have a huge table to put in the while loop, but i'm finding it difficult to concatenate it. How can I add multilines with more ?
<?php
$dbhost = 'xxxx';
$dbuser = 'xxxx';
$dbpass = 'xxxx';
$dbname = 'xxxx';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname, $conn);
$resul...
I am just about to launch a fairly large website for the first time. I have turned off all error messages in my php.ini and error messages are now logged to an "error_log" file on my server.
My question is, now that the errors are logged to a file, what are the best ways that web developers keep on top of seeing when/where errors occur...
I made some changes on a CSS file on a PHP site.
The changes do not show up in any browser I test it on until I hold down the CTRL key and click the browser's REFRESH button.
This means that most users are not going to seem the changes I made.
How can I force browsers to show the changes to CSS files immediately (without renaming the ...
I'm writing a quick preg_replace to strip comments from CSS. CSS comments usually have this syntax:
/* Development Classes*/
/* Un-comment me for easy testing
(will make it simpler to see errors) */
So I'm trying to kill everything between /* and */, like so:
$pattern = "#/\*[^(\*/)]*\*/#";
$replace = "";
$v = preg_replace($pattern...
My jquery looks like this:
var as = $("input[name=as[]]").serialize();
var bs = $("input[name=bs[]]").serialize();
var cs = $("input[name=cs[]]").serialize();
but it's not serializing the first set at index 0.
...
I'm about to launch a website and I'm going over my php.ini to prepare all the settings for a production environment.
I'm debating whether to leave output_buffering On, Off, or set it to a buffer limit (like 4096). Is there any pro's or con's to having the output_buffer turned On or Off? I've read that turning the buffer Off will give...
The title says it all. If a file is uploaded to the server, how can I make sure that it's actually a picture (not just a file with a .jpg or .gif extension)?
...
I'm trying to figure out a way to call an html form from C, inject a bit of javascript, then submit the file and check the new URL (header from php) to make sure the form submitted correctly. Got any ideas???
...
I have a C#.Net Web Service and php client to invoke the web service.
Web Service Methods takes C# objects as parameters and returns C# objects as follows
Site getSite(siteID){ return Site.load(siteID) }
or
void newSite(Site site){ site.save(); }
I know that WSDL tool generates c# classes and java has code generator for web servi...
I'm trying to get a value from a netcat connection started at a php file, but it dies with:
localhost [127.0.0.1] 2000 (?) : Connection refused
I don't know why but it works well if I ssh it as apache user (www-data), this is what I've done:
1) Start an endless loop serving a date with a little delay:
$ (while true; do nc -l -p 2000...
I want the users of my application to stay logged in for very long periods of time. The problem is the the session expires on the server end, thus losing variables stored in the session. So, I'm setting the session to expire in 10 days.
My question is: Is there any security or performance issues of setting the GC expiry and cookie lifet...