how to change the path of a zendframework project - zend-framework

Hi
I want to set up a zend frame work project in my local system. I have downloaded the files and folder and set up in my local xampp (ie, within htdocs I have created a folder named NFL_021. Here I copied all the files and folders). But I need to change the path to /NFL_021/www e:g, from /images/site/register-here.png to /NFL_021/www/images/site/register-here.png It's very difficult to change each and every page. Is there is any easy way to set up this?
Please reply

I think baseUrl view helper would be useful. With this helper you could just specify relative path to your files, e.g.:
<img src="<?php echo $this->baseUrl('/images/site/register-here.png'); ?>" />

Related

Embed a image to eclipse and display it with scala

I would like to ask how to display an image and how to embed it on eclipse.
after embedding it i am trying to display it as
<img src=("/UbitMvc/riivo.jpg")/>
<img src="/UbitMvc/1.jpg">
<img src="/home/ilgun/play/UbitProject/Resources/1.jpg">
so basically i'm trying every possible way. What i am doing wrong ?
At least for Play! 2.0 and above, yu'll need to add a GET to your /conf/routes file in order to be able to access your images.
GET /assets/*file controllers.Assets.at(path="/public", file)
Also I believe that the standard for Play! applications is to drop all images, javascripts, and stylesheets into their appropriate folder within the /public directory.
ex. /public/images/riivo.jpg
So your img call should end up being
<img src=#routes.Assets.at("/images/riivo.jpg")>

How can i upload my tempates to concrete5?

I am using c5 for social networking of my members. For front page i have my own templates in which all my css/images/javascript files are involved.How can i upload my template and change the theme.I just want to use my theme.How can i connect all this?
Why don't you create a theme. In your root/themes/, create a folder and name it basically whatever you want, as long as it's not the same as the name of one of the other themes. in that folder, create a default.php and view.php, as well as an "elements" folder where you can store your theme's header.php and footer.php, examples of which can be found in your root/concrete/themes/greensalad.
You could just copy that greensalad folder from root/concrete/themes/ to root/themes/, then change the name of the folder to a unique name for your custom theme -- root/themes/my_custom_theme, for example. After that, modify the new folder's contents however you want to. that's what i would do.
once you've created a theme that includes the required default.php and view.php, as well as your header.php and footer.php, you can create folders inside root/themes/my_custom_theme to store your root/themes/my_custom_theme/js, root/themes/my_custom_theme/css, root/themes/my_custom_theme/images, etc.
Lastly, you have to install your new theme. You can do that on your dashboard at yoursite.com/dashboard/pages/themes/, or, if you don't have pretty urls enabled, yoursite.com/index.php/dashboard/pages/themes/.
After that you should see your custom theme there, at yoursite.com/dashboard/pages/themes/, under "installed themes."
you can grab your .js files from your root/themes/my_custom_theme/js/, and your .css files from your root/themes/my_custom_theme/css/, by including something like the following in your custom theme's header.php, footer.php or default.php.
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/my_custom_style.css" />
<script type="text/javascript" src="<?php echo $this->getThemePath(); ?>/js/my_custom_script.js"></script>

Zend display image

Hi i'm using zend framework and what i want is to show an image.
My image is in a folder /uploads/photo/default.jpg.
If i move the folder to /public/... everithing works fine but I would prefere to leave there if i can because all images are profile's image so i don't want to leave them in public...
My code to show the image is
<img id="image" src=<?php echo $this->baseUrl().'/uploads/foto/default.jpg'; ?> >
And I know that it don't work but there are a way to leave my folder there changing my code?
The images need to be publicly accessible so a browser can view them. If you don't want to physically store them in the public folder you either need to make them accessible from there (by creating a symlink from public/uploads to your uploads folder), or serve them via. a PHP script, which would be able to read the data from wherever the file is located.
Serving binary data via. PHP has its own issues, as it will be slower and you'll need to ensure you send the appropriate headers. But this would allow you to restrict access, e.g. only allowing users to view their friends' profile images, if this is your goal.

How to set relative URL in servlet jsp

I'm jumping into an existing JSP project, using eclipse spring, tomcat 6.
Our project currently has the URL: http:localhost/path1 as its base.
In my index.jsp, when I try to reference .css & .js using: "/css/my.css"
It doesn't append the "/path1" before it, how do I set it up to automatically add that?
And I can't use a variables as I want to these fixed paths inside my .css file to reference images.
I don't want to explicitly type it in as that "path1" will change later.
Thanks!
Context path need to be included at the beginning of the url. If you don't want to hardcode the context path, you may use the following
<%# include file="${pageContext.request.contextPath}/css/My.css" %>
Yes, use <c:url value="/css/file1.css" /> - this will append the context.

Where do I put picture in my ASP.Net MVC2 application?

Where do I place images within my solution?
I usually create Images folder inside Content folder. Most 3rd party components that use .css files search images subdirectory for their images by default.
You could put them in the Content folder, along with your .css files. Or you could create a brand new folder and organize it any way you like.
In the content folder.
We have a separate resources domain that serves up all static content (recommended). In the solution, I just have a 'resources' folder that mimics the structure of the production folder. Easier to deploy using a script. You can create a separate site or vdir on your local web server and map it to this static folder. The location could then be refernced in your project via an app setting (configuration.resourcedomain + "/resources/images/xyz.jpg")