Codeigniter css错误加载图像

时间:2017-05-23 11:16:29

标签: php css .htaccess codeigniter

我一直在搞乱,因为当我查看页面时,它说他无法加载图像,但调试器中没有错误,因此可能是框架错误或htacess。这发生在我创建我的视图新闻之后,我接受了URL中的一个参数(第4个)。

this is the error image

我的htacess

ReWriteEngine On
RewriteCond $1 !^(index\.php|resources|assets|robots\.txt)
ReWriteCond %{REQUEST_FILENAME} !-f
ReWriteCond %{REQUEST_FILENAME} !-d
ReWriteRule ^(.*)$ index.php/$1 [L]

2 个答案:

答案 0 :(得分:0)

似乎没有获取完整的网址。将总图像网址与域名一起提供,如

#include<stdio.h>
#include<stdlib.h>

typedef struct list
{
    int val;
    struct list* next;
} node;

int main()
{
    node* top;
    top = NULL;
    int i;
    int n,m;
    while(1)
    {
        fflush(stdin);
        printf("Please enter i\n");
        scanf("%d", i);
        switch(i)
        {
            case 1:
            {
                printf("\nenter val");
                scanf("%d", &n);
                top=push(n, top);
            }
            case 2:
            {
                m = pop(top);
                printf("Deleted value is %d", m);
            }
            case 3:
            {
                return 0;
            }
        }
    }
}


node* push(int a,node* s)
{
    if(s==NULL)
    {
        s = malloc(sizeof(node));
        s->val = a;
        s->next = NULL;
        return s;
    }
    else
    {
        node* temp;
        temp = malloc(sizeof(node));
        temp->val = a;
        temp->next = s;
        s = temp;
        return s;
    }
}

node* pop(node* s)
{
    int x;
    node* temp;
    x = s->val;
    printf("deleted value is %d", x);
    temp = s->next;
    s->next = NULL;
    free(s);
    s = temp;
    return s;
}

答案 1 :(得分:0)

尝试在config.php上设置基本网址示例

$config['base_url'] = 'http://loaclhost/youyproject/';

或者如果域名有点像

$config['base_url'] = 'http://www.example.com/';

然后自动加载url helper config / autoload.php

$autoload['helper'] = array('url');

然后尝试使用

<img src="<?php echo base_url('assets/images/uploads/uploads/b.pn‌​g');?>" />

确保资产文件夹在应用程序的一侧

application

assets

system

index.php