Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Image Displaying problem


Go to End


2 Posts   2076 Views

Avatar
xyz

14 Posts

21 November 2007 at 12:37am

Hi

Here i am writing one function in my own page i.e
function ImageObject() {

$gdObject = new GD("../mysite/images/image.png ");
$gdObject->resize;
$gdObject->gd;
}
The image path is correct ,the path is going to GD class
but it is giving below error

FATAL ERROR: getimagesize(../mysite/images/image.png) [function.getimagesize]: failed to open stream: No such file or directory
At line 33 in C:\lighttpd\htdocs\sapphire\filesystem\GD.php

please anybody help me urgent

thanks

Avatar
xyz

14 Posts

21 November 2007 at 1:26am

Hi

i got the solution for that problem.

my one more doubt is we are displaying any string in our page by using below function

 
function printThis() { 
$data = array( 
'str' => "Some string" 
); 
return $this->customise($data); 
} 

And and what you had in your .ss template will still work:
[html]
<% control printThis %>
<p>$str</p>
<% end_control %>
[/html]

But my question is how can we send a image from php to html

thanks