Skip to content

Tag: php

Where do you put non-controller classes in codeigniter?

I’ve got a class Widgets. Widgets are made up of Doohickies. I’m never going to need to access Doohickies directly via url — they’re essentially a private class, only used by Widgets. Where do you put your code to define the Doohicky class? In /app/controllers/doohicky.php? in app/cont…

PHP – send file to user

I have a pdf file on disk that i need to send to a user when they make a request to a php script, what is the best way of doing this?

How to create transparent watermark on an image using gdlibrary? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question How to create transparent watermark on an image using gd library? I want to rotate the image…

Questions about shifting from mysql to PDO

I have recently decided to switch all my current plain mysql queries performed with php mysql_query to PDO style queries to improve performance, portability and security. I just have some quick …

How do I get the base URL with PHP?

I am using XAMPP on Windows Vista. In my development, I have http://127.0.0.1/test_website/. How do I get http://127.0.0.1/test_website/ with PHP? I tried something like these, but none of them worked. Answer Try this: Learn more about the $_SERVER predefined variable. If you plan on using https, you can use …

What is a good, free PHP charting suite?

All I will be doing is basic line graphs. Any experiences anyone might share would be greatly appreciated. Answer openflashchart: http://teethgrinder.co.uk/open-flash-chart/ A bit beyond simple line charts. LGPL licensed so it’s commercial friendly. For really simple charts take a look at the jQuery spa…